ボタンクリックから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>
Global.ascx:
routes.MapRouteLowercase(
"",
"employer/details/{id}",
new { controller = "Employervas", action = "Details", id=UrlParameter.Optional }
);
ここで、ボタンをクリックすると、データベースの最初からIDが取得されます..
このためのjqueryコードを生成する方法??助けてください..