DesignComboBoxListItemElements.aspx
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ajax ComboBox - How to use css to design ComboBox list item elements in asp.net</title>
<style type="text/css">
.GreenTypeComboBoxStyle .ajax__combobox_itemlist li {
background-color: DarkGreen;
border: 1px solid YellowGreen;
color: White;
font-size:medium;
font-family:Courier New;
padding-bottom: 5px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:DarkBlue; font-style:italic;">
ASP.NET Ajax ComboBox - How to use css to design
<br /> ComboBox list item elements in asp.net
</h2>
<hr width="525" align="left" color="LightBlue" />
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<br /><br />
<asp:ComboBox
ID="ComboBox1"
runat="server"
DropDownStyle="DropDown"
AutoCompleteMode="None"
AutoPostBack="false"
RenderMode="Block"
CssClass="GreenTypeComboBoxStyle"
>
<asp:ListItem Text="GoldenRod"></asp:ListItem>
<asp:ListItem Text="FloralWhite"></asp:ListItem>
<asp:ListItem Text="DeepPink"></asp:ListItem>
<asp:ListItem Text="DarkSlateBlue"></asp:ListItem>
<asp:ListItem Text="DarkGoldenRod"></asp:ListItem>
<asp:ListItem Text="Chocolate"></asp:ListItem>
<asp:ListItem Text="BlanchedAlmond"></asp:ListItem>
</asp:ComboBox>
</div>
</form>
</body>
</html>
No comments:
Post a Comment