Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a simple user control, just combined label and textbox inside of div with rounded corners. What should I do to make browsers to remember previously typed textbox's values. I couldn't make AutoCompleteType property working. Here is the control:
HTML
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TextBox.ascx.cs" Inherits="UserControls.TextBox" %>
<div>
 <asp:Label ID="lbl" CssClass="lbl" runat="server" Text="">
 <div id="tbDiv"  runat="server" class="tbRoundedWithShade">
    <asp:TextBox ID="tb" runat="server" CssClass="box" ontextchanged="tb_TextChanged" AutoPostBack="false" >
 </div>
 <div style="display: inline-block; color: Red; visibility: hidden"  runat="server" id="lblRequired" >*


I assume some programming will be required. Does anybody have a sample?

Regards
Posted
Updated 22-Jun-15 17:11pm
v2

1 solution

AutoComplete is a browser setting. It is controlled by the user.
To turn these settings on, try How do I enable Autofill in my browser?[^].

You can turn this setting off for individual text boxes by using the autoComplete attribute.
E.g. textbox1.Attributes.Add("autocomplete", "off");
 
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