Reputation: 905
I am new to ASP.NET MVC and rewriting a webform app to MVC. In my webform, I have asp.net control, GRIDVIEW. Can I add asp.net gridview to MVC? If not, what is the alternative solution?
Upvotes: 0
Views: 515
Reputation: 12621
No you cannot use web form controls ( i.e. <asp:GridView />
, <asp:ListView />
, <asp:Label />
) in MVC projects. No massive ViewState thank god lol.
Alternatives:
I personally like DataTables . You can use the NuGet Package manager to find packages that will help you wire up DataTables with MVC by simply typing "datatables mvc" in the search. I have used DataTables.Mvc in a couple projects and have been happy with it so far.
Another way, might be to use the Microsoft WebGrid (System.Web.Helpers namespace). I have used this in a couple project as well, and it seems to to the job. Here is an example of its use.
Upvotes: 3