ProgrammingPope
ProgrammingPope

Reputation: 2237

How do I open a new page from code behind?

This question is probably already answered here, but I couldn't find the answer? Is there any way to navigate to another page in code-behind?

Upvotes: 1

Views: 3364

Answers (3)

anishMarokey
anishMarokey

Reputation: 11397

by using

1) Response.Redirect("path");

2)Server.Transfer("path");

Upvotes: 0

Jason Berkan
Jason Berkan

Reputation: 8884

In addition to Response.Redirect, you can also use Server.Transfer("~/path_to/newpage.aspx"), which is useful when you want to display a different page to the user without the URL in the browser changing.

Upvotes: 6

Daniel A. White
Daniel A. White

Reputation: 190897

Response.Redirect("path_to/newpage.aspx");

Upvotes: 7

Related Questions