DropDownList Problem in Asp.net 4.0 (Visual Studio 2010)?

ApurvA

New member
jai matadi ..

i m getting problems in DropDownList Control while i m trying to use it with inbuilt Ajax Extentions...in ASP.NET 4.0 (VISUAL STUDIO 2010) ..

well below is my code ..

--------------------------------------------
mypage.aspx
------------
<form id="form1" runat="server">
<div>


<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
</asp:DropDownList>
</ContentTemplate>

<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>


<br />
<br />

</div>
</form>
--------------------------------------------
mypage.aspx.cs
--------------
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write("hello");
Label1.Text = "hello";

}

what i want here is when the user selects particular value of the DropDownList.. he/she will get the message like "hello" which i m trying to do .. but m not able to do it .. tell me whts wrong with my code as m not able to work it with ScriptMAnager ..
 
Back
Top