I have a form where I collect some data and have a Submit button. Under submit, I want to run the click event code (where I save the data to profile variables)then I want to jump to the postbackurl page. When I set the postbackurl, it goes straight to the
postback page without running the code under button click event. Is there a way to make it run the click event code then postback?
advlaser
Member
1 Points
5 Posts
Button: Run click event code then go to postbackurl ?
Feb 16, 2009 06:21 PM|LINK
I have a form where I collect some data and have a Submit button. Under submit, I want to run the click event code (where I save the data to profile variables)then I want to jump to the postbackurl page. When I set the postbackurl, it goes straight to the postback page without running the code under button click event. Is there a way to make it run the click event code then postback?
Advantage Laser Products
www.advlaser.com
tehremo
Star
10540 Points
1704 Posts
Re: Button: Run click event code then go to postbackurl ?
Feb 16, 2009 08:50 PM|LINK
In your click event, run everything you want then the last thing in your click event:
Response.Redirect(http://www.yourURL.com);
asdf fdsa
Member
31 Points
122 Posts
Re: Button: Run click event code then go to postbackurl ?
Feb 16, 2009 09:37 PM|LINK
last thing on click event (this should be the last piece of code):
c#:
Response.Redirect("url.aspx");
vb (basicaly the same thing):
Response.Redirect("url.aspx")