ComboBoxAutoCompleteModeAppend.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">
protected void ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = "You select: " + ComboBox1.SelectedItem.Text;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ajax ComboBox - Using ComboBox AutoCompleteMode Append 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 Append in asp.net
</h2>
<hr width="500" align="left" color="Pink" />
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:Label
ID="Label1"
runat="server"
Font-Size="Large"
ForeColor="Green"
>
</asp:Label>
<br /><br />
<asp:ComboBox
ID="ComboBox1"
runat="server"
DropDownStyle="DropDown"
AutoCompleteMode="Append"
CaseSensitive="false"
RenderMode="Block"
AutoPostBack="true"
Font-Names="Comic Sans MS"
Font-Size="Large"
OnSelectedIndexChanged="ComboBox1_SelectedIndexChanged"
>
<asp:ListItem Text="DarkRed"></asp:ListItem>
<asp:ListItem Text="SaddleBrown"></asp:ListItem>
<asp:ListItem Text="DarkSalmon"></asp:ListItem>
<asp:ListItem Text="DeepPink"></asp:ListItem>
<asp:ListItem Text="IndianRed"></asp:ListItem>
<asp:ListItem Text="SkyBlue"></asp:ListItem>
</asp:ComboBox>
</div>
</form>
</body>
</html>
No comments:
Post a Comment