Can We Use Gridview in Mvc
In Web Application, Displaying Data in a Gridview Is a Common Requirement. Hence, We Will Walkthrough Possible Ways of Designing Grid View in Asp. Nethow Can...
In web application, displaying data in a gridview is a common requirement. Hence, we will walkthrough possible ways of designing grid view in ASP.NET
How can use data grid view in ASP.NET MVC?
- Open Visual Studio 2010, Go to the New Project – Visual C#, Web, then ASP.NET MVC Web Application and click OK.
- After Clicking OK, New ASP.NET MVC5 Project window will open and there you have to choose MVC and press OK.
How can we retrieve data from database and display in GridView in MVC?
- public ActionResult GetDetails()
- {
- var data = DB. tblStuds. ToList();
- return PartialView(data);
- }