user2852418
user2852418

Reputation: 377

How can I redirect a webpage in C#

I am making a simple website in c#, I have a login system and I want to redirect a user to a new home page once they are logged in, how do I do this?

Also how do I redirect someone to a new page at the click of a button? e.g click btnMath redirects user to MathPage.aspx

Upvotes: 0

Views: 156

Answers (2)

Amit Joki
Amit Joki

Reputation: 59292

Response.Redirect("url");

You can do the above

Upvotes: 2

DevelopmentIsMyPassion
DevelopmentIsMyPassion

Reputation: 3591

there are many method available to do so. One of those is response.redirect

Response.Redirect("MathPage.aspx") 

Remember to mention path correctly inside response.redirect.

You can read this link as well.

Upvotes: 2

Related Questions