sachin Shrestha
Member
- Joined
- Oct 31, 2021
- Messages
- 13
- Programming Experience
- Beginner
Which is Good To Use By View bag or By ViewModel
[/CODE]
Doing it With viewbag:
[HttpGet]
public ActionResult Edit(string searchedSiblingStudentName=null)
{
Viewbag.SearchedStudentName= searchedSiblingStudentName;
return View()
}
Doing It With ViewModel:
[HttpGet]
public ActionResult Edit(string searchedSiblingStudentName=null)
{
var dd= new EditViewModel();
dd.SiblingStudentName=searchedSiblingStudentName;
return View(dd)
}