如何在单击提交按钮后清除我的页面信息.....它将转到另一页面 [英] How to clear my page information after clicking submit button .....its going to another page
本文介绍了如何在单击提交按钮后清除我的页面信息.....它将转到另一页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在页面中提供一些文本然后转到另一页面。之后,当我回到浏览器中的那个页面时,仍然显示以前的数据.... plz我想清除那些数据。 PLZ给我解决方案..............
I am giving some text in a page then its going to another page. after that when i back to that page in browser still the previous data are showing ....plz i want to clear those data. plz give me solution..............
推荐答案
如果您在控件中的数据比仅仅清除它
if your data in a control than simply you clear it like
TextBox1.text="";
TextBox2.text="";
<head runat="server">
<title></title>
<script>
function clearForm() {
document.getElementById('<%=TextBox1.ClientID%>').value = "";
}
</script>
</head>
<body onload="clearForm()">
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" >
</asp:TextBox><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
</div>
</form>
</body>
参考 - 注销后浏览器后退按钮问题 [ ^ ]。
您需要删除浏览器缓存。
Refer - Browser back button issue after logout[^].
You need to delete browser cache.
这篇关于如何在单击提交按钮后清除我的页面信息.....它将转到另一页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文