Reputation: 4759
If I have this URL:
http://stackoverflow.com/question/ask?type=great
How do I get the complete route and query string values in the View most economically eg this
/question/ask?type=great
Upvotes: 0
Views: 360
Reputation: 1906
If you want to get to it from the View, you could use httpcontext
like this:
@HttpContext.Current.Request.Path
Upvotes: 1
Reputation: 1906
you can set the action method in your controller to automatically parse the query string for you. You don't need to do anything to your route.
get query string values in mvc
Upvotes: 0