Add below action in page
- public ActionResult GetDetails()
-
- {
- var data = DB.tblStuds.ToList();
- return PartialView(data);
- }
Add partial view for this action. RightClick on above Action > add View > Enter ViewName Same as action name > tick Create Partial View
Now we have index.cshtml where we have Show Data Button for which I have ajax call for getting stud details.
Index.cshtml
Final Screen