I have a lot of experience with ASP.NET MVC 1-5. Now I learn ASP.NET Core MVC and have to pass a parameter to link in page. For example I have the following Action
[HttpGet]
public ActionResult GetProduct(string id)
{
ViewBag.CaseId = id;
return View();
}
How can I implement the link for this action using tag helpers?
<a asp-controller="Product" asp-action="GetProduct">ProductName</a>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…