Search code examples
vb.netcomboboxajaxcontroltoolkit

ajaxToolkit:ComboBox Drop Down List


I my Web page I have a ComboBox Control

<asp:ComboBox ID="Country" runat="server" TabIndex="8" Width="145" 
                        BackColor="Silver" CssClass="RegComboCountryEntry"
                        ValidationGroup="SetUserValGroup" ToolTip="Country Selection"  />

And in my code behind I have the following code in order to load the Items.

CtryID.Clear()
CtryName.Clear()
            dbHandler.SQLComm = New SqlCommand("SELECT * FROM aspnet_UsersCountries", aspProvider.SQLConn)
            If aspProvider.SQLConn.State = ConnectionState.Closed Then aspProvider.SQLConn.Open()
            myReader = dbHandler.SQLComm.ExecuteReader()
            While myReader.Read()
                Country.Items.Add(Trim(myReader(1)))
                CtryID.Add(myReader(0))
            End While

The all work is going fine, but the drop down list is not appeared in the proper position (just down of the control). instead it appears at the right - down position of the page.
And the Long of the list is not controlled. It has a standard Long.

Is it possible for someone to assist me on this?


Solution

  • Fortunately I solved my issue.
    In the control I was use

    asp:ComboBox
    

    Instead of

    <asp:DropDownList