Hi,
I am doing an mvc application.
I am unable to send data from view to controller.
View code @Html.ActionLink(item.coursename,"Details","Home",new {name=item.coursename})
@model IEnumerable
Index
@foreach(var item in Model)
{
}
controller code:
public ViewResult Details(string name)
{
return View(db.students.Where(x=>x.cousename==name.ToString()).ToList());
}
the parameter value for string name is showing null.
thanks in advance
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Bryian TanRank #396 · 6.3K reputationPosted Jul 14, 2018, 9:30 AM EDT
harry code125 reputationPosted Jul 14, 2018, 9:48 AM EDT
harry code125 reputationPosted Jul 14, 2018, 9:54 AM EDT
Bryian TanRank #396 · 6.3K reputationPosted Jul 14, 2018, 10:20 AM EDT