c# razor url parameter from view
Why does Request["parameterName"]
returns null within the view? I know I can get it from the controller but I have to make a little check in the View. I am using ASP.NET MVC 3.
You can use the following:
Request.Params["paramName"]
See also: When do Request.Params and Request.Form differ?
I've found the solution in this thread
@(ViewContext.RouteData.Values["parameterName"])