Showing posts with label Inlinefunction. Show all posts
Showing posts with label Inlinefunction. Show all posts

Monday, March 28, 2011

How to use ComboBox RenderMode Block and Inline in asp.net

ComboBoxRenderMode.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 RenderMode Block and Inline in asp.net</title>  
</head>  
<body>  
    <form id="form1" runat="server">  
    <div>  
        <h2 style="color:DarkBlue; font-style:italic;">  
            ASP.NET Ajax ComboBox - How to use ComboBox  
            <br /> RenderMode Block and Inline in asp.net  
        </h2>  
        <hr width="525" align="left" color="LightBlue" />  
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  
        </asp:ToolkitScriptManager>  
        <asp:Label   
            ID="Label1"   
            runat="server"  
            Font-Size="Large"  
            ForeColor="DarkGreen"  
            Font-Italic="true"  
            Text="ComboBox RenderMode Inline"  
            >  
        </asp:Label>  
        <br /><br />  
        <asp:ComboBox   
            ID="ComboBox1"   
            runat="server"   
            DropDownStyle="DropDown"  
            AutoCompleteMode="None"  
            CaseSensitive="false"  
            RenderMode="Inline"  
            AutoPostBack="false"  
            Font-Names="Comic Sans MS"  
            Font-Size="Medium"  
            ForeColor="SaddleBrown"  
            >  
              <asp:ListItem Text="Red"></asp:ListItem>  
              <asp:ListItem Text="Green"></asp:ListItem>  
              <asp:ListItem Text="Yellow"></asp:ListItem>  
              <asp:ListItem Text="White"></asp:ListItem>  
        </asp:ComboBox>  
        <br /><br /><br />  
        <asp:Label   
            ID="Label2"   
            runat="server"  
            Font-Size="Large"  
            ForeColor="Crimson"  
            Font-Italic="true"  
            Text="ComboBox RenderMode Block"  
            >  
        </asp:Label>  
        <br /><br />  
        <asp:ComboBox   
            ID="ComboBox2"   
            runat="server"   
            DropDownStyle="DropDown"  
            AutoCompleteMode="None"  
            CaseSensitive="false"  
            RenderMode="Block"  
            AutoPostBack="false"  
            Font-Names="Comic Sans MS"  
            Font-Size="Medium"  
            ForeColor="SaddleBrown"  
            >  
              <asp:ListItem Text="IndianRed"></asp:ListItem>  
              <asp:ListItem Text="Crimson"></asp:ListItem>  
              <asp:ListItem Text="DarkBlue"></asp:ListItem>  
              <asp:ListItem Text="Khaki"></asp:ListItem>  
        </asp:ComboBox>  
    </div>  
    </form>  
</body>  
</html>