Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
49 Points
70 Posts
Mar 21, 2012 09:18 AM|LINK
in my controller:
public ActionResult Details() { ViewBag.h=new SelectList(new Hobby_MasterService().GetHobbies(),"Hobby_Id");
return View(); } [HttpPost] public ActionResult Details(int Hobby_Id)
{
Hobby_Master hm = new Hobby_MasterService().GetHobby_Data(Hobby_Id);
return View(hm);
}
priya77
Member
49 Points
70 Posts
Re: to get value of selected option from dropdownlist and pass it to controller
Mar 21, 2012 09:18 AM|LINK
in my controller:
public ActionResult Details()
{
ViewBag.h=new SelectList(new Hobby_MasterService().GetHobbies(),"Hobby_Id");
return View();
}
[HttpPost]
public ActionResult Details(int Hobby_Id)
{
Hobby_Master hm = new Hobby_MasterService().GetHobby_Data(Hobby_Id);
return View(hm);
}