How to best integrate HTML/design with C# code in ASP.Net or ASP.Net MVC? [duplicate]

浪子不回头ぞ 提交于 2019-12-04 20:23:15

In my opinion, regardless of how you generate your markup, it's worthwhile to plan that out well. If you merely require the server controls to emit markup that works, you can end up with a significant maintenance burden in terms of keeping your CSS/JS/HTML in order. It's far too easy with ASP.NET webforms and server controls to emit lousy markup.

While I may not code every last bit of HTML for every page I find a clean, well-planned HTML "sketch" can be a helpful starting point for the ASP.NET developers. Get it to the point where the CSS folks can begin applying styles and the ASP.NET devs can develop the functional pieces.

Let me answer it from a purely ASP.Net MVC perspective:

  • I will get the designers to still do the HTML design, but at a smaller "view" level rather than a complete page level

  • Then compose pages from the Views with proper valid XHTML, CSS & the works

  • During this composition phase, understand some of the REST-ful features of ASP.Net MVC & see if the UI actions can be properly mapped to REST actions

  • Bring in the developers to start writing ViewModel classes which can be bound to the Views

  • So, while the developers provide the ViewModel classes & mechanism to hydrate them, the designers will be designing HTML views which will be bound to a given ViewModel

HTH.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!