I have an asp.net mvc 5 project. Inside a view I want to pass a parameter from the request's query string to an action. Here's what i did:
<a href="@Html.Action("GetData", "TestController", Request.QueryString["param"])"> Click here</a>
But this doesn't pass the querystring param. Any ideas? Thanks
@Html.Action("GetData", "TestController", new { param = Request.QueryString["param"] })<a href="@Url.Action("GetData", "TestController", new{ parameter = Request.QueryString["parameter"]})">Click here</a>