我想从按钮单击中获取 id...
控制器:
//Get
public ActionResult Details(int id)
{
// Get member details for the specified member id
VasPlan vasplan = _repository.GetVasPlan(id);
// return this member to the default view
return View(vasplan);
}
看法:
<a href="<%:Url.Action("Details","Employervas") %>"><img src="../../Content/Images/Subscribe now on click.png" class="btn"/></a>
全球.ascx:
routes.MapRouteLowercase(
"",
"employer/details/{id}",
new { controller = "Employervas", action = "Details", id=UrlParameter.Optional }
);
在这里,当我单击按钮时,它将从数据库中的第一个获取 id..
如何为此生成jquery代码?请帮助我..