views:

405

answers:

1

In the context of this question link text is possible from a Controller that responds to a Form Post to go to the Friendly Url?

+1  A: 

Yes. Your controller action can determine the friendly url based on how you would like the route defined for it, then do a Redirect to the friendly url instead of returning the view. It will cause another browser request which will add load to to your server, so you'd want to be sure that it was really important.

tvanfosson
Can you tell me how this is done?
Jedi Master Spooky
Which -- finding the friendly url or doing the redirect? Constructing the friendly url and the controller action to handle it is really a matter of you deciding how. Doing the redirect is just constructing a RedirectResult with the appropriate url.
tvanfosson
I already have the friendly url so the RedirectResult, thanks
Jedi Master Spooky
The way is RedirectToAction("action","controller",parameters)
Jedi Master Spooky