ComboBoxAutoCompleteModeSuggestAppend.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>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ajax ComboBox - Using ComboBox AutoCompleteMode SuggestAppend 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 SuggestAppend in asp.net
</h2>
<hr width="500" align="left" color="LightBlue" />
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:Label
ID="Label1"
runat="server"
Font-Size="X-Large"
ForeColor="Green"
Font-Italic="true"
Font-Underline="true"
>
</asp:Label>
<br /><br />
<asp:ComboBox
ID="ComboBox1"
runat="server"
DropDownStyle="DropDown"
AutoCompleteMode="SuggestAppend"
CaseSensitive="false"
RenderMode="Block"
AutoPostBack="true"
Font-Names="Comic Sans MS"
Font-Size="X-Large"
OnSelectedIndexChanged="ComboBox1_SelectedIndexChanged"
ForeColor="Red"
>
<asp:ListItem Text="SaddleBrown"></asp:ListItem>
<asp:ListItem Text="Black"></asp:ListItem>
<asp:ListItem Text="Magenta"></asp:ListItem>
<asp:ListItem Text="Blue"></asp:ListItem>
<asp:ListItem Text="Violet"></asp:ListItem>
<asp:ListItem Text="BlueViolet"></asp:ListItem>
</asp:ComboBox>
</div>
</form>
</body>
</html>