tags:

views:

60

answers:

2

This might be a stupid question...

I have a view which posts back to the controller. I want the controller to now POST to another page with certain parameters instead of sending a 300(Redirect) to the browser? I want to persist a value which I don't want to output int he query string.

A: 

Can you use a Server.Transfer? You can set your parameters in the HttpContext.Items collection or use values from the previous page.

benjynito
+1  A: 

I'd suggest using the Redirect and taking advantage of TempData to store the value you don't want included in the query string as a better solution unless the method is in the same controller and you don't care about the Url. If it's in the same controller, you could simply call the method from the current action. If you use TempData, you'll run into some problems with refreshes, but if that's an issue you could store the value in the Session so that it's available longer term.

tvanfosson