4th parameter of Html.ActionLink can have any number od properties:
<%= Html.ActionLink("Check this", "Edit", "test", new { id = id, data=name }, new { style = "display:block" })%>
Theese properties are inserted into URL based on routing, but if the property name cannot be matched into any route it is added as URL GET parameter. So if you have standard route "{controller}/{action}/{id}", you will get the URL test/Edit/[id]?data=[name] from the above code.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers