Does ASP.NET MVC use the regular toolbox controls?

后端 未结 7 2118
予麋鹿
予麋鹿 2020-12-15 01:55

In ASP.NET MVC, do I use the \"regular\" controls from the toolbox and assign data to them like I did with webforms? Can I use the gridview, for example?

Thank you.<

7条回答
  •  旧时难觅i
    2020-12-15 02:08

    The answer is Yes and No. Preferrably No.

    This is what the community fears, an aggressive blending of asp.net and MVC into an unrecognizable and unecessarily complicated kludge.

    For anyone looking at MVC, I'd suggest:

    • Appreciate clean simple HTML. Empty out your toolbox :-)
    • Surf and learn how to code controls to be generated the way you need them to. Strongly typed, powerful html generators will come but I'd prefer them to be clean and not wrapped in a control, I want to see the code.
    • try not to mix asp.net and mvc ( tempting ) but unless you're forced to, consider it a no-no

    So to answer your question, MVC is still new, MVC Contrib, MVC Futures and Html helpers are avaiable in the framework and all over the web. Keep surfing and keep your own library of tweaks then post them so others can find and improve on them and vice versa. MVC can be the change the .net community has been waiting for, let's not go back to drag and drop so quickly.

    Good luck!

提交回复
热议问题