简体   繁体   中英

Changing background color of dropdownlist

Could someone tell me how to change the background color of dropdownlist in vb.net visual studio 2012? I have the following code.

Imports System.ComponentModel
Imports System.Web.UI
Imports System.Data.SqlClient
Imports System.Drawing

<DefaultProperty("DataTable"), _
 ToolboxData("<{0}:DataDropDownList  runat=server></{0}:DataDropDownList>")> _
Public Class DataDropDownList
    Inherits System.Web.UI.WebControls.DropDownList
    DataDropDownList.BackColor = System.Drawing.Color.Crimson

End Class

您可以为此DataDropDownList创建CSS样式,您对此有何看法?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM