'C# text box when clicked displays drop down with previous values entered
Using visual studio and added a text box for searching and it is automatically adding a drop down displaying previous entered text double spaced. How to get rid of it? I’ve tried everything but the correct fix. Code was added in Site.Master Thanks in advance.
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" runat="server" href="~/" title="Home">Live</a>
<!-- Search Text Box -->
<div style="margin-right: 0px; padding-right:0px; float:left;">
<asp:TextBox runat="server" CssClass="ignore-css" ID="txtSearchBox" placeholder="Search" style="margin-top: 15px; background-color: #fff; margin-right: 0px; padding-right: 0px; height: 22px;"></asp:TextBox>
</div>
<!-- Search Button -->
<div style="margin-left: 0px; padding-left:0px; float:left;">
<asp:ImageButton runat="server" ID="btnSearch" ImageUrl="~/images/searchIcon.png" CssClass="btnSearch" OnClick="imgSearchButton_Click" />
</div>
</div>
<div class="nav navbar-nav navbar-right dropdown-ql">
<button class="dropbtn-ql">Quick Links & LCOM</button>
<div class="dropdown-content-ql" id="ddlQuickLinks" runat="server"></div>
</div>
</div>
</div>
Solution 1:[1]
You can turn off autocomplete by adding autocomplete="off" attribute to your textbox.
Solution 2:[2]
Check this -> HTML autocomplete Attribute Html input autocomplete attribute. Just set off in order to get rid of this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | SnowGroomer |
| Solution 2 |
