There is a textbox on the page for the user to enter data. When the user clicks the hyperlink on the page, it will enter another page. At this time, click the browser "back" button to return to the original page, the text entered in textbox is displayed. However, sometimes the data is confidential and cannot be displayed in this case, so the problem arises ..
There are many ways to try on the Internet, such as setting Meta, closing viewstate, and so on. I have tried it and it is useless. The best way is to use JavaScript to clear it during page onbeforeunload.
Code (work in ff2.0, ie7.0 ):
<HtmlXmlns= "Http://www.w3.org/1999/xhtml">
<HeadRunat= "Server">
<Title>Untitled page</Title>
<ScriptType= "Text/JavaScript">
Function Clear ()
{
VaRTB=Document. getelementbyid ("Textbox1" );
TB. Value='' ;
}
</Script>
</Head>
<BodyOnbeforeunload= "Clear ();">
<FormID= "Form1"Runat= "Server" >
<Div>
<ASP: buttonID= "Button1"Runat= "Server"Text= "Button" />
</Div>
<ASP: textboxID= "Textbox1"Runat= "Server" > </ASP: textbox>
</Form>
<P>
<AHref= "Default5.aspx">Default5.aspx</A> </P>
</Body>
</Html>