Click here to Skip to main content
16,011,988 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i want to know,if we type something in a textbox, that remains there itself as like pop down menu.i want to clear it each time the page load event takes place.
what shall i do for this??
someone help me..
Posted

Turn off the autocomplete for that textbox.

Way 1
ASP.NET
<asp:textbox id="TextBox1" autocomplete="off" runat="server" textmode="Password" xmlns:asp="#unknown"></asp:textbox>

Way 2
JavaScript
document.getElementById('txtPassword').setAttribute('autocomplete','off');

Disable IE/Firefox remember password ?[^]
 
Share this answer
 
Comments
kwhiterosek 28-Jul-11 12:40pm    
ya it works.
can u tell me what the autocompletetype property will do??
thatraja 28-Jul-11 14:08pm    
It just disables the auto complete thing(browser cache) for that particular control in the page(browser).
Well create the store (session object/viewstate variable) where this text is being stored.
 
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