Does ASP.NET MVC use the regular toolbox controls?

后端 未结 7 2108
予麋鹿
予麋鹿 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条回答
  •  暖寄归人
    2020-12-15 02:21

    No, any control that uses the __doPostBack JavaScript function to trigger postbacks will not work. Also there is no concept of ViewState in ASP.NET MVC so any control that relies on ViewState or ControlState will not work either.

    The idea behind ASP.NET MVC is to take a different approach than the heavier WebForms model (and most of its controls).

提交回复
热议问题