Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have 2 Updatepanels in my aspx page.
1st updatepanel has dropdownlist with autopostback as true
2nd updatepanel has usercontrol in it

my need is, Based on SelectedItemvalue of dropdownlist the usercontrols should behave.

When i change the dropdownlist index, it is firing the usercontrol first, then selectedindexchanged is firing.
So, unable to get the latest value in usercontrol code file.

please look at the markup code

<asp:Content ID="Content3" runat="server"         ContentPlaceHolderID="cph_fieldset_before">
<asp:ScriptManager runat="server" EnablePartialRendering="true" 
          ID="ScriptManager1" />
<asp:UpdatePanel runat="server" ID="updatePanel1"  UpdateMode="Conditional" >
<contenttemplate>
<div class="optional" id="printerTeamLeftList_Div" tabindex="-1">
<label for="projectTeamList">Printer(s)</label>
<asp:DropDownList runat="server" id="printerTeamList" rows="8" 
           datatextfield="Name" datavaluefield="ID" AutoPostBack="true" />
</div>
</contenttemplate>


<asp:UpdatePanel runat="server" ID="updatePanel2" UpdateMode="Conditional">
<contenttemplate>
<div class="no-border">
<dttwnew:twlinksnew  runat="server" id="twlinknew" foldertype="pretwo"/>
</div>
</contenttemplate>


Can somebody guide me on this..

Thanks and Regards,
Pawan.
Posted

1 solution

For second update panel you have made the update mode Conditional. Just set the AsynchronousTrigger property to the printerTeamList's SelectedIndex change event. Check out http://mattberseth.com/blog/2007/07/indepth_the_updatepanel_aspnet.html[^] for AsyncPostbackTrigger.

Hope this helps.
All the best.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900