Model :
public class CareersModel
{
public List
}
public class JobOpening
{
public int Id { get; set; }
public string Header { get; set; }
public string Content { get; set; }
}
}
Controller :
public ActionResult Careers()
{
List
{
new JobOpening{Id = 1, Header = "Job1", Content = "edde" },
new JobOpening{Id = 2,Header = "Job2", Content = "deded" },
};
return View(job);
}
HTML:
@foreach (var job in Model)
{
}
In above code,two div are shown ,because two items are there in list, now in html i want ADD button , on which if we click a item will be added to list and shown in HTML page,after which there will 3 div on page .Thanks for help
Abhijeet SinghPosted Mar 31, 2014, 6:35 AM
http://stackoverflow.com/questions/2272606/click-items-in-select-box-and-then-display-a-text-input
it may be helpful.