We help IT Professionals succeed at work.
Get Started

autocompleteextender position

DTwined
DTwined asked
on
1,161 Views
Last Modified: 2013-11-08
Hello -

I am not able to get my autocompleteextender to show up directly beneath and aligned with my textbox. I am using IE 8.

Below is my code, css, and a screenshot of the autocompleteextender in action.

ASP.NET 3.5

thanks
// CSS    
.completionListElement
{ 
    visibility : hidden;
    margin : 0px! important;
    background-color : inherit;
    color : black;
    border : solid 1px gray;
    cursor : pointer;
    text-align : left;
    list-style-type : none;
    font-family : Verdana;
    font-size: 11px;
    margin-left:5px;
    line-height:20px; 
    padding:0px;
}
.listItem
{
    background-color: white;
    padding : 1px;
}     
.highlightedListItem
{
    background-color: #c3ebf9;
    padding : 1px;
}

/// ASPX
<form id="form1" runat="server">
    <div>
        
        <asp:ScriptManager ID="sm1" runat="server" />
        
        <asp:Label ID="lblEmpName" Text="Employee Name:" AssociatedControlID="txtEmpName" runat="server" />
        
        <asp:TextBox ID="txtEmpName" AutoPostBack="true" AutoComplete="off" 
                    runat="server" ontextchanged="txtEmpName_TextChanged1" /> 
                <asp:AutoCompleteExtender ID="ace1" TargetControlID="txtEmpName" ServiceMethod="GetSuggestions"
                    MinimumPrefixLength="2"  OnClientItemSelected="ace1_itemSelected" FirstRowSelected="true"
                    runat="server" CompletionInterval="1" 
                    CompletionListCssClass="completionListElement"
                    CompletionListItemCssClass="listItem"
                    CompletionListHighlightedItemCssClass="highlightedListItem" 
                    UseContextKey="True"/>
                    
                <asp:HiddenField ID="hdEmpID" runat="server" />
    </div>
    </form>

Open in new window

screen shot of autocompleteextender current positioning
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE