locked
remove the break RRS feed

  • Question

  • User1788249541 posted

    Hi All,

       I am using the textbox followed by AutoCompleteExtender1 control. while entering the data in text box the corresponding value displayed in AutoCompleteExtender control. But It have little bit space(one break space<br>) between textbox and AutoCompleteExtender control..  How can  i remove this space. ?

    Monday, July 6, 2015 5:41 AM

Answers

  • User1724605321 posted

    Hi vjagades ,

    Thanks for your post .

    According to your description , you could modify the "CompletionListCssClass" and "CompletionListItemCssClass" attribute to achieve your requirement .

    Code below is for your reference:

    <!DOCTYPE html>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <style type="text/css">
            .autocomplete_completionListElement {
                visibility: hidden;
                margin: 0px !important;
                background-color: inherit;
                color: windowtext;
                border: buttonshadow;
                border-width: 1px;
                border-style: solid;
                cursor:default;
                overflow: auto;
                height: 200px;
                text-align: left;
                list-style-type: none;
                padding:0;
            }
            /* AutoComplete item */
    
            .autocomplete_listItem {
                background-color: window;
                color: windowtext;
                padding: 1px;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server"
                EnablePageMethods="true">
            </asp:ScriptManager>
            <div>
                <asp:TextBox ID="txtInfo" runat="server"></asp:TextBox>
                <cc1:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server" ServicePath="AutoCompleteHandle.asmx"
                    ServiceMethod="GetData" TargetControlID="txtInfo" MinimumPrefixLength="1" CompletionSetCount="10" CompletionListCssClass="autocomplete_completionListElement"
                    CompletionListItemCssClass="autocomplete_listItem"
                    CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem">
                </cc1:AutoCompleteExtender>
    
            </div>
        </form>
    </body>
    </html>
    

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 6, 2015 11:33 PM