pass parameter to actionlink mvc code example
Example 1: Html.ActionLink with parameters
@Html.ActionLink(
"Reply", // linkText
"BlogReplyCommentAdd", // actionName
"Blog", // controllerName
new { // routeValues
blogPostId = blogPostId,
replyblogPostmodel = Model,
captchaValid = Model.AddNewComment.DisplayCaptcha
},
null // htmlAttributes
)
Example 2: asp mvc url.action parameter
<a href="<%: Url.Action("GetByList", "Listing", new { name = "John", contact = "calgary, vancouver" }) %>">
<span>People</span>
</a>