example of ajax control "DropDown" using asp.net
DropDown.aspx
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="DropDown.aspx.cs"
Inherits="DropDown"
%>
<%@ 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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
<asp:Panel ID="panelItems" runat="server" BorderColor="Aqua" BorderWidth="1">
<%--<asp:BulletedList
ID="BulletedList1" runat="server" >
<asp:ListItem Text="Item
1"></asp:ListItem>
<asp:ListItem
Text="Item 2"></asp:ListItem>
<asp:ListItem
Text="Item 3"></asp:ListItem>
</asp:BulletedList>--%>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
</asp:Panel>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:DropDownExtender ID="DropDownExtender1" runat="server"
DynamicServicePath=""
Enabled="true"
DropDownControlID="panelItems"
TargetControlID="TextBox1">
</asp:DropDownExtender>
</div>
</form>
</body>
</html>
DropDown.aspx.cs
using System;using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class DropDown : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
0 comments :