What is the best way to integrate HTML / design with C # code in ASP.Net or ASP.Net MVC?

We are working on a new ASP.Net site. The last main site we made was in the classic ASP - the procedure we used was to execute the HTML first and then β€œspice it up” with the ASP code.

In the ASP.Net world, how does it work? That is, how do designers do their job if a significant part of the label is actually generated by the server controls?

We also see ASP.Net MVC as a potential lightweight alternative.

It would be very interesting to know what worked best for people in both scenarios in terms of working with designers and integrating their work with code.

UPDATE: I clarified what I asked here , and not quite the same question, but quite similar, so this could possibly be combined with it. Any advice on how to combine them would be greatly appreciated.

+1
source share
3 answers

In my opinion, no matter how you create your layout, you should plan it well. If you just want the server controls to generate markup that can work, you can get a significant maintenance burden in terms of keeping your CSS / JS / HTML in order. It's too easy with ASP.NET web forms and server controls to fix lousy markup.

Although I cannot encode every last bit of HTML for every page, I believe that a clean, well-planned HTML sketch can be a useful starting point for ASP.NET developers. Get it to the point that CSS users can start applying styles, and ASP.NET developers can develop functional parts.

+1
source

Let me answer it with pure ASP.Net MVC:

  • I want the designers to still do the HTML design, but at a lower level of "appearance", and not at the full level of the page

  • Then create pages from views with the correct valid XHTML, CSS, and works

  • During this build phase, familiarize yourself with some of the features of REST-ful ASP.Net MVC and see if the user interface actions for REST actions are displayed correctly.

  • Lead developers to start writing ViewModel classes that can be attached to views

  • So, although developers provide classes and a ViewModel mechanism for hydrating them, designers will develop HTML views that will be associated with this ViewModel

NTN.

+1
source
0
source

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


All Articles