hi i have to nagivate to another page in asp.net suppose i have two pages ie Default.aspx and Default2.aspx how to i naviagte between them
+2
A:
there are many ways, here are a few to get you started
<a href="default2.aspx">go there</a>
<asp:HyperLink runat="server" ID="lnk" Text="go there" NavigateURL="default2.aspx" />
<asp:LinkButton runat="server" ID="btn" Text="go there" OnClick="server_method_that_redirects" />
Jason
2009-03-01 11:48:39
+1
A:
You could use anchors in your aspx page:
<a href="Default2.aspx">Click to navigate to Default2.aspx</a>
or make a redirect in your code behind:
Response.Redirect("~/Default2.aspx");
Darin Dimitrov
2009-03-01 11:49:57
A:
On your server side codebehind you may also consider using Server.Transfer(..) instead of Response.Redirect(..). Response.Redirect sends an instruction to the browser to change the page while Server.Transfer does it directly on the server side. Browse the web for further information about the differences.
Juri
2009-03-01 13:53:01