ComboBoxCssClass.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 ComboBox CssClass property in asp.net</title>
<style type="text/css">
.RedTypeComboBoxStyle .ajax__combobox_textboxcontainer input {
background-color: Ivory;
border: 2px solid DeepPink;
color: Crimson;
font-family:Comic Sans MS;
font-size:large;
}
.RedTypeComboBoxStyle .ajax__combobox_buttoncontainer button {
background-color: SandyBrown;
border: 1px solid SaddleBrown;
}
.RedTypeComboBoxStyle .ajax__combobox_buttoncontainer button {
background-color: SandyBrown;
border: 1px solid SaddleBrown;
}
.RedTypeComboBoxStyle .ajax__combobox_itemlist
{
background-color:FloralWhite;
color:HotPink;
font-family:Courier New;
font-size:large;
font-style:italic;
border: 2px dotted Pink;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:DarkBlue; font-style:italic;">
ASP.NET Ajax ComboBox - How to use ComboBox
<br /> CssClass property in asp.net
</h2>
<hr width="500" 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="RedTypeComboBoxStyle"
>
<asp:ListItem Text="Orange"></asp:ListItem>
<asp:ListItem Text="FireBrick"></asp:ListItem>
<asp:ListItem Text="CadetBlue"></asp:ListItem>
<asp:ListItem Text="LightPink"></asp:ListItem>
<asp:ListItem Text="DeepPink"></asp:ListItem>
</asp:ComboBox>
</div>
</form>
</body>
</html>
No comments:
Post a Comment