In Asp.NET MVC, how do you make your controller return a view with a query string?
thanks
In Asp.NET MVC, how do you make your controller return a view with a query string?
thanks
It might be better if you post what you are trying to accomplish. The simple answer is that you can't, the querystring is part of the request so if you wanted to do that you would need to redirect to your view with the querystring as part of the URL... but it sounds like you are perhaps trying to use the querystring to pass data to the view? If so you are much better off using ViewData.
This should get you started with returning views. And this tutorial should show you how params can be passed into actions to generate specific results.