srujana thallam

srujana thallam

  • NA
  • 76
  • 137k

how to get the model values in controller

Oct 20 2014 9:26 AM
My model class
 
public class Hop
{
public string Name { get; set; }
}
public class Home
{
public IEnumerable<Hop> selHopList { get; set; } 
}
 
my controller
------------
[HttpPost]
public ActionResult CreateHop(Home hopValues)
{


Ienumarable  list= hopValues.selHopList;  //like this i want get

return View();



In my controller i want to get these values how? can any one help me .

Answers (1)