Showing posts with label ComboBox TextBox. Show all posts
Showing posts with label ComboBox TextBox. Show all posts

Monday, March 21, 2011

How to use css to design ComboBox textbox container input element in asp.net




ComboBoxTextboxContainerInputElement.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 textbox container input element in asp.net</title>  
    <style type="text/css">  
        .BlueTypeComboBoxStyle .ajax__combobox_textboxcontainer input {  
            background-color: AliceBlue;  
            border: 2px solid DarkBlue;  
            color: DodgerBlue;  
            font-family:Trebuchet MS;  
            font-size:large;  
            padding-left: 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 textbox container input element 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="BlueTypeComboBoxStyle"  
            >  
              <asp:ListItem Text="DeepSkyBlue"></asp:ListItem>  
              <asp:ListItem Text="Lavender"></asp:ListItem>  
              <asp:ListItem Text="DodgerBlue"></asp:ListItem>  
              <asp:ListItem Text="LightGreen"></asp:ListItem>  
              <asp:ListItem Text="MidnightBlue"></asp:ListItem>  
        </asp:ComboBox>  
    </div>  
    </form>  
</body>  
</html>