Can i create a gridview control in Asp.net MVC,and set its DataSource propertie and DataBind method,mormally as in web forms?
+1
A:
No - ASP.NET MVC has no ViewState and therefore no native WebForms controls will work.
There are a number of hybrid approaches for people who wish to use controls in MVC but if you wish to work in that way it would be better to use WebForms.
David Neale
2010-05-10 14:46:02
+1
A:
Technically it is possible - wrap the grid inside a <form runat="server">
tag and you are back in the WebForms business - ViewState, postback etc. However I would too not recommend this approach. You better use a mixed WebForms-MVC approach. You can also check the available grid solutions for MVC.
korchev
2010-05-18 13:22:01