Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a text box,when I login to my page , text box is auto filled with texts, that is previously saved in my chrome browser, I want to remove only that text from text box without removing that previously saved values

What I have tried:

I tried many things,still have the problem.
tried

code behind :: txtSEmail.Attributes.Add("autocomplete", "false");
and
jquery ::$(document).ready(function () {
$('#txtSEmail').attr('autocomplete', 'off');
});
and

server side :: <asp:TextBox ID="txtSEmail" runat="server" Width="175px" class="txtBox" autocomplete="off">
or
<asp:TextBox ID="txtSEmail" runat="server" Width="175px" class="txtBox" AutoCompleteType="Disabled">


Is there any other solution for this problem???
Posted
Updated 29-Jun-18 3:26am

1 solution

try with this one
<form id="form1" runat="server" autocomplete="off">  
//your content  
</form>  


or

By using code in .cs page,
protected void Page_Load(object sender, EventArgs e)   
{  
    if (!Page.IsPostBack)  
    {  
        txt_userid.Attributes.Add("autocomplete", "off");  
    }  
}  

Hope Its help you.
 
Share this answer
 
Comments
vinu paul 1-Jul-18 23:24pm    
This was also I tried,not working

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