Closed JeremyCaney closed 4 years ago
Question: "Determine functional differences between
<partial for />
,<partial model />
and@Html.EditorFor()
"
Html.EditorFor(o => o.BindingModel.Trainer, "Contact", "BindingModel.Trainer", null)
BindingModel.Trainer
) to be set independently of model (o.BindingModel.Trainer
)/EditorTemplates
, which helps is a nice organizational structure<partial name="Contact" for="BindingModel.Trainer" />
@Model
is implicit; this enforces use of a valid model property<partial name="Contact" model="Model.BindingModel.Trainer" />
BindingModel
Given this, my recommendation is that we use <partial for />
on GoldSim, as it uses declarative markup, correctly interprets the HTML field name, and supports nested complex objects.
Establish new ASP.NET Core views to provide the user interface for the forms.
Current Approach
The current forms use ASP.NET WebForm Web Controls wrapped up in User Controls to expose the user interface, centralize reusable components, and provide both client- and server-side form validation.
New Approach
With ASP.NET Core, the forms will now use standard MVC views. Reusable components can be handled via either partial views or—if they need to be parameterized—Razor components or view components. Form validation can now be handled using a combination of POCO attribute annotations as well as Microsoft’s
jQuery-Validation-Unobtrustive
library for client-side validation. With ASP.NET Core 3.0 specifically, the input controls can now use the built-in Razor components.Research
<partial for />
,<partial model />
and@Html.EditorFor()
[Range()]
approach isn't workingWeb
navigation? Perhaps with aTopicLookup
of root namespaces?Steps (Application)
CoreContract
,Profile
)EditorTemplate
sEmail.cshtml
for representing the general email templatePartial views
OptionalContact
CoreContact
Contact
ExtendedContact
Address
Profile
ExtendedProfile
ModuleSelection
Forms
AcademicInstructor
AcademicStudent
Demo
Evaluation
Newsletter
Quote
Training
UserConference
Issues
gmail.com
).JQuery-Validate-Unobtrusive
classes._CoreContact
.This will likely represent the largest effort in the forms migration, since much of the legacy code won’t translate to the new format.