Redirect from asp.net page
4 answers
As mentioned in TheTXI, Response.Redirect
will work fine.
However, the button click code won't work until the end of the page's lifecycle. It might be that additional or unnecessary work might be required on your server. If that's the only thing you're doing, just wrap the button in an anchor tag:
<a href="url"><asp:button .../></a>
+1
a source to share
Here's an example on how this will happen
Public Sub Click (ByVal sender As Object, ByVal e As System.EventArgs)
Response.Redirect(SelectedItem.Text)
End Sub
+1
a source to share