自定义下拉列表样式(CSS/JS与ASP.. NET c#连接)

Custom Drop Down List Styling (CSS/JS with ASP.NET C# Connection)

本文关键字:NET ASP 连接 JS 样式 下拉列表 CSS 自定义      更新时间:2023-09-26

目前我正在使用ASP.net下拉列表:

<asp:DropDownList ID="CourseSelectionDropdown" DataTextField="DropdownDisplay" DataValueField="CourseId"
            runat="server" Font-Size="Small" Width="250px" OnSelectedIndexChanged="CourseSelectionDropdown_OnSelectedIndexChanged"
            AutoPostBack="True"> 

它看起来相当丑陋,我想使用下面的东西,我将进一步自定义(删除图像,并使每个列表项双行-很像facebook的下拉菜单)。

http://tympanus.net/Tutorials/CustomDropDownListStyling/index2.html

我是ASP.net的新手,想要一些关于如何将HTML/JS列表项与c#代码中的方法链接起来的指针。

我在网上搜索了两个小时,没有任何具体的或易于阅读的解决方案。

通常您只需使用一个基于jquery的插件,它将把您的SELECT转换为更复杂的样式HTML。

见:http://tutorialzine.com/2010/11/better-select-jquery-css3/