Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

server.transfer and button event

Status
Not open for further replies.

jn03

Programmer
Jan 16, 2003
45
CA
Hi,

I use Server.Transfer in the "btn_OnClick" sub as shown below, and I have to press the button twice for the page to be redirected.
The first time the button is pressed, the page does a postback and that's it. I have to press the button again in order to go to page2.
It works fine if I use Response.Redirect instead of Server.Transfer.
How can I make it to work using Server.Transfer? (I don't want another trip to the server using Response.Redirect).

thanks in advance.

--------------------
Private Sub btn_OnClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click

Server.Transfer("Page2.aspx")

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top