Programmatically Sending the User to Another Page

N

Nathan Sokalski

I would like to be able to send the user to another URL programmatically.
Because the destination URL is not known until runtime, I cannot use the
Response.Redirect method. I do not want to use the Server.Transfer method
because I need the new URL to be displayed in the browser's address bar.
Does anybody have any ideas? Thanks.
 
A

arunprakashb

I am not sure i understand. But wont Response.Redirect work with a
runtime formed string? like say, an user entered url?
 
N

Nathan Sokalski

It might if it is generated before the response is sent (although I'm not
100% sure), but either way it is not working for what I am doing. My code is
as follows:

Private Sub NavBarButtons_Command(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.CommandEventArgs)

Response.Redirect(e.CommandArgument)



End Sub


I assign this procedure to dynamically generated ImageButton controls using
the following line of code:

AddHandler NavBarButton.Command, AddressOf Me.NavBarButtons_Command



The CommandArgument property is the URL that I want the user to be taken to.
If you have any other questions about what techniques I am using, feel free
to ask. Thank you for any help you can give.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top