Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How to avoid caching of TextBox(Password) even user press RefreshButton(F5)
I've a Login form user control which is being used into two pages if a user login from one page then it should display "Logged In" even in second page and also if a user clicks on sign out button from Second page then it should also logged out from First page. But if i press Refresh button of First Page then again not letting that user to sign out.
Posted

check this question
How avoid the cache of Textbox[^]
--NDK
 
Share this answer
 
Comments
Tech Code Freak 23-Jan-12 2:55am    
Good link! 5up!
Use this
ASP.NET
<asp:textbox textmode="Password" id="txtPassword" runat="server" width="125px" autocompletetype="None" autocomplete="False" ></asp:textbox>
 
Share this answer
 
v2
Comments
.NET- India 20-Jan-12 6:17am    
Here is my code

<asp:HiddenField ID="hidPassword" runat="server" />
<asp:TextBox ID="txtName" runat="server">

<asp:TextBox ID="txtPassword" TextMode="Password" autocompletetype="None" autocomplete="False" runat="server">

<asp:Button ID="btnClick" Text="Click" runat="server" OnClick="btnClick_Click" />
<asp:Button ID="btnRefresh" Text="Refresh" runat="server" OnClick="btnRefresh_Click" />

protected void Page_Load(object sender, EventArgs e)
{
designLinks();
}

public void designLinks()
{
Response.Write(txtName.Text + "," + txtPassword.Text);
}
Tech Code Freak 20-Jan-12 6:39am    
Edited question to remove ----> xmlns="#unknown"
.NET- India 20-Jan-12 6:45am    
still not working....
when u refresh the page your page being submited again,
do one thing you add attibute

like txtPassword.attrbute.add("value","") after login
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900