Click here to Skip to main content
13,091,369 members (54,873 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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 20-Jan-12 0:03am
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

check this question
How avoid the cache of Textbox[^]
Tech Code Freak 23-Jan-12 2:55am
Good link! 5up!
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Use this
<asp:textbox textmode="Password" id="txtPassword" runat="server" width="125px" autocompletetype="None" autocomplete="False" ></asp:textbox>
.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)

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....
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

when u refresh the page your page being submited again,
do one thing you add attibute

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 20 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100