please help me to do this
this is the code i have used in VS2005,
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DropDownlistWF.aspx.cs"
Inherits="TestProject.DropDownlistWF" EnableViewState="true"%>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="ddl" runat="server" AutoPostBack="true"
EnableViewState="true"
OnSelectedIndexChanged="ddl_SelectedIndexChanged">
<asp:ListItem Text="Item1" Value="1"></asp:ListItem>
<asp:ListItem Text="Item2" Value="2"></asp:ListItem>
<asp:ListItem Text="Item3" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
</form>
</body>
</html>
----------code behind -------------------
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace TestProject
{
public partial class DropDownlistWF : System.Web.UI.Page
{
protected void ddl_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write(ddl.SelectedItem.Text);
}
}
}