Mark Kadlec
Mark Kadlec

Reputation: 8440

How to route to an outside URL from within MVC controller?

I'm embarrassed to even ask this question, but not sure of the syntax or way to do this.

I have a controller method where I would like to route to a URL outside of the MVC application. The reason for this is because I am using authentication from another webforms app and would like to clear out any session variables before routing to the other app.

So basically, how can you route to www.microsoft.com from a controller action?

Upvotes: 0

Views: 126

Answers (1)

Franci Penov
Franci Penov

Reputation: 75981

Use Controller.Redirect. Note that this is not technically "routing", it's "redirecting", but should work just fine for you.

Upvotes: 2

Related Questions