Hello,
I am using HTML controls. When a user clicks on button1, following java
script code is executed
button1_click( )
{
document.webform1.submit( );
}
On the page load event
txt.Text = "Hi";
is executed
When a user clicks on button2, following code is executed on the server
button2_ServerClick( )
{
Response.Redirect( "webform2.aspx" );
}
Now if I click on button1 first time, I get "hi" message. Then is I click on
'button2, webform2.aspx is displayed. but Now if I click the 'Back' menu of
the browser, I again get 'webform1.aspx'. Now if I click on 'button1' again
then instead of displaying text 'Hi' it redirects to Webform2.aspx'.
Sushi
"sushi" wrote:
Hello,
I am developing an asp.net website. In this I am using a web form say'
Web form1.aspx' which has two button controls say 'button1' and 'button2'.
When I am click 'button1' it displays a text 'Hi'. When I click the other
button 'button2', it redirects to different page say' Webform2.aspx'.
Now if I click the 'Back' menu of the browser, I again get
'webform1.aspx'. Now if I click on 'button1' again then instead of displaying
text 'Hi' it redirects to Webform2.aspx'.
Does any one know why this is happening?
I am using java scripts document.webform1.submit( ) method for posting data
back to the server.
Thanks,
Sushi