3

How can i remove the arrow at dropdownlist show in asp.net,i dont want the arrow because i want use my own image to create a fancy look for dropdownlist.

 <asp:DropDownList ID="cboLang" Runat="server" AutoPostBack="True" onselectedindexchanged="cboLang_SelectedIndexChanged" Font-Size="XX-Small" Width="95" Height="26" >
                        <asp:ListItem Value="EN-US">ENGLISH</asp:ListItem>
                        <asp:ListItem Value="ZH-CN">&#20013;&#25991;</asp:ListItem>
                        <asp:ListItem Value="TH-TH">&#3616;&#3634;&#3625;&#3634;&#3652;&#3607;&#3618;</asp:ListItem>
                        <asp:ListItem Value="EN-IE">ti&#7871;ng Vi&#7879;t</asp:ListItem>
                        <asp:ListItem Value="EN-TT">Korean</asp:ListItem>
                        <asp:ListItem Value="EN-AU">Indo</asp:ListItem>
                        </asp:DropDownList>
user1511029
  • 125
  • 2
  • 4
  • 13

3 Answers3

5

you can add cssClass to your dropdown cssClass="select" like :

<asp:DropDownList ID="cboLang" Runat="server" cssClass="select" AutoPostBack="True" onselectedindexchanged="cboLang_SelectedIndexChanged" Font-Size="XX-Small" Width="95" Height="26" >
                    <asp:ListItem Value="EN-US">ENGLISH</asp:ListItem>
                    <asp:ListItem Value="ZH-CN">&#20013;&#25991;</asp:ListItem>
                    <asp:ListItem Value="TH-TH">&#3616;&#3634;&#3625;&#3634;&#3652;&#3607;&#3618;</asp:ListItem>
                    <asp:ListItem Value="EN-IE">ti&#7871;ng Vi&#7879;t</asp:ListItem>
                    <asp:ListItem Value="EN-TT">Korean</asp:ListItem>
                    <asp:ListItem Value="EN-AU">Indo</asp:ListItem>
                    </asp:DropDownList>

and add the following style to the head tag

<style>
.select
{
    border-radius: 5px;
   -webkit-appearance: none;
}
</style>
mTiger
  • 51
  • 1
  • 3
2

You cant do it with asp.net dropdown controls. you can use auto complete textbox at that place. it is also possible to hide arrow with telerik combo box.

Manibhadra
  • 400
  • 4
  • 6
-1

Not possible to change how <select> tag is rendered , you can use any other way to display multiple values as autocomplete textbox

check these links :

Remove dropdown (select) button from dropdown menus?

Remove drop-down arrow from <select> element?

Community
  • 1
  • 1
Mahmoud Farahat
  • 5,364
  • 4
  • 43
  • 59