ComboBoxAutoCompleteModeSuggest.aspx
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<script runat="server">
protected void ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = "You choose: " + ComboBox1.SelectedItem.Text;
}
</script>
<head id="Head1" runat="server">
<title>Ajax ComboBox - Using ComboBox AutoCompleteMode Suggest in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:DarkBlue; font-style:italic;">
ASP.NET Ajax ComboBox - Using ComboBox
<br /> AutoCompleteMode Suggest in asp.net
</h2>
<hr width="475" align="left" color="LightBlue" />
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:Label
ID="Label1"
runat="server"
Font-Size="Large"
ForeColor="SaddleBrown"
Font-Italic="true"
>
</asp:Label>
<br /><br />
<asp:ComboBox
ID="ComboBox1"
runat="server"
DropDownStyle="DropDown"
AutoCompleteMode="Suggest"
CaseSensitive="false"
RenderMode="Block"
AutoPostBack="true"
Font-Names="Comic Sans MS"
Font-Size="X-Large"
OnSelectedIndexChanged="ComboBox1_SelectedIndexChanged"
>
<asp:ListItem Text="Coral"></asp:ListItem>
<asp:ListItem Text="Cornsilk"></asp:ListItem>
<asp:ListItem Text="SandyBrown"></asp:ListItem>
<asp:ListItem Text="DeepPink"></asp:ListItem>
<asp:ListItem Text="Gray"></asp:ListItem>
<asp:ListItem Text="Crimson"></asp:ListItem>
</asp:ComboBox>
</div>
</form>
</body>
</html>
No comments:
Post a Comment