ASP.NET MVC Complex Views

I have a question about complex views in ASP.NET MVC. Where can I find good examples or best practice information for complex views and how best to create them in ASP.NET MVC. I know the basics, but piling up HTML with complex dynamic HTML and / or jQuery seems messy.

It would be helpful to appreciate any links to best practice or case studies.

+3
source share
1 answer

To reduce page complexity, I find that I am developing ViewUserControls to encapsulate reusable functions that are part of multiple pages. Sometimes it’s general (for example, GridControl), sometimes it’s specific (for example, a set of role-based menu items that are enabled only when the user logs in). I use the main page to configure the main page layout so that it is common to all pages - this includes controls and a login / logout menu. Each view then includes the other ViewUserControls that are required through the RenderPartial HtmlHelper extension.

, , - , , , WebForms - , WebForms. , New Edit, ViewUserControl, View, , . , . WebForm DetailsView .

MVC- - , , . , , . , WebForm.

+3

Source: https://habr.com/ru/post/1703474/


All Articles