About Me

My photo
Nadiad, Gujarat, India
Hi Friends I am Vipul Soni, an Innovative web Designer & Developer with Excellent skills who thrives on challenges and is passionate for all areas of web Design & Development.

Wednesday, 6 April 2011

Drop down list in Update panel


<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering ="true"/>
<div>
&nbsp;</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode ="Conditional" >
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" DataTextField="fieldname" DataValueField="fieldname" autopostback="true" OnSelectedIndexChanged ="DropDownList1_SelectedIndexChanged">
</asp:DropDownList>
<asp:DropDownList ID="DropDownList2" runat="server" DataTextField="Text" DataValueField="Val">
</asp:DropDownList>
</ContentTemplate>
<Triggers >
<asp:AsyncPostBackTrigger ControlID ="DropDownList1" EventName ="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode ="conditional" >
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" /><br />
<asp:Label ID="Label1" runat="server" Text="Label" Width="152px"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
&nbsp;
</form>
Here's the code from my form -
<td><asp:UpdatePanel ID="updateRecipe" runat="server" UpdateMode ="Conditional" >
<ContentTemplate><asp:DropDownList ID="JobDescription" runat="server" DataTextField="Text" DataValueField="val" Width="150px" CssClass ="grdData" AutoPostBack="True" OnSelectedIndexChanged ="JobDescription_SelectedIndexChanged">
</asp:DropDownList> </ContentTemplate><Triggers >
<asp:AsyncPostBackTrigger ControlID ="JobDescription" EventName ="SelectedIndexChanged" />
</Triggers></asp:UpdatePanel>

0 comments:

Post a Comment

There was an error in this gadget