...

View Full Version : page redirect



Richiet23
02-19-2007, 04:01 PM
can anyone give me the code to navigate from one page to another in an aspx page please, when a button is pressed.

NuneatonSam
02-21-2007, 02:45 AM
Well you could just do it with html?

But i guess you could also put response.redirect("page.aspx") in the button sub as well, good luck.

Freon22
02-21-2007, 05:12 AM
can anyone give me the code to navigate from one page to another in an aspx page please, when a button is pressed.You should give a little more information on what you are trying to do.

If all you what to do is move from one page to another a hyperlink will work just fine.


<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="test.aspx">HyperLink</asp:HyperLink>


But if you what to do some type of program logic then maybe a button is one way of doing it.


Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
If Islogin = True Then
Response.Redirect("test.aspx")
Else
Response.Redirect("noaccess.aspx")
End If

End Sub

Hope this helps.

Richiet23
02-21-2007, 11:44 AM
done it now thanks, thank you for your help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum