In ASP.NET MVC3 razor, can’t we directly bind the dataset to the WebGrid as we do it ASP.NET. Do we always need to use the Model?Is it required to convert my DataTable to list first?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In ASP.NET MVC, data is passed from controller to view by using
Models, here are few links to help you get started with webgrid.Best Beginner guide to webgrid
MSDN Example
More Examples
This is considered best practice while using MVC, however you can still do and use webgrid without models,
Here is a small example from Mike’s site, where he doesn’t use model. But it is strongly advised to use model only !!!