In asp.net 3.5 using vb i would like to go to another page in my application when the user clicks a button. what is the command for doing this?
Thank you
In asp.net 3.5 using vb i would like to go to another page in my application when the user clicks a button. what is the command for doing this?
Thank you
As TheTXI mentioned, Response.Redirect will work just fine.
However, your button click code won't run until late in the page life cycle. Your server may have to do quite a bit of extra or unnecessary work first. If this is the only thing you are doing, just wrap the button in an anchor tag:
<a href="url"><asp:button .../></a>
Here is an example of how that would happen
Public Sub Click (ByVal sender As Object, ByVal e As System.EventArgs)
Response.Redirect(SelectedItem.Text)
End Sub