silemone
asked on
From a User Control, how do I update UpdatePanel?
I have a .aspx page that holds some data that should be updated (therefore data is housed in an UpdatePanel) when my user control parameters are changed.
Basically, how do I update the UpdatePanel in the aspx page that hold the .ascx (user control)?
My code is written in VB.NET
Basically, how do I update the UpdatePanel in the aspx page that hold the .ascx (user control)?
My code is written in VB.NET
ASKER
no, unfortunately...its outside of the Updatepanel
ok, then just add the user control`s ID in the asyncpostback trigger list of the update panel
ASKER
oops...this is a user control, meaning it was created...all postbacks appear to be generated in the .ascx (user control page) page...not in the aspx page...
I got difficulty to understand what you are talking about... I know what a usercontrol is and all, but how are you using it; you are creating it dynamically (from code) or add it in the aspx???
It will all be easier if you post some code....
It will all be easier if you post some code....
ASKER
ok.
In this example...I have a user control...can be a update button and a textbox...
on click of update, make in the aspx below, in the label = the same as the textbox from the user control.
In this example...I have a user control...can be a update button and a textbox...
on click of update, make in the aspx below, in the label = the same as the textbox from the user control.
<table class="FormTable" cellspacing="0" cellpadding="0" width="600" align="center">
<tr>
<td colspan="3"><uc1:ReplicationSettings ID="ReplicationSettings1" runat="server" Visible="false" />
</tr>
</table>
<asp:UpdatePanel ID="uPanelGrid" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:label" id="label" runat="server">
</ContentTemplate>
</aspx>
ok, you ReplicationSettings control should raise an event when he is updtead. so just to be sure we will leave the event name of the trigger blank.
ther is no reason for this to dont work :
http://stackoverflow.com/q uestions/4 48287/how- to-add-tri gger-to-up datepanel- where-the- event-for- trigger-is -inside-a- user-co
ther is no reason for this to dont work :
http://stackoverflow.com/q
<table class="FormTable" cellspacing="0" cellpadding="0" width="600" align="center">
<tr>
<td colspan="3"><uc1:ReplicationSettings ID="ReplicationSettings1" runat="server" Visible="false" />
</tr>
</table>
<asp:UpdatePanel ID="uPanelGrid" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ReplicationSettings1" />
</Triggers>
<ContentTemplate>
<asp:label" id="label" runat="server">
</ContentTemplate>
</aspx>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I added an event handler, raised an event and it worked perfectly...thanks for help...
if yes, you could just set children as trigger to true or add the user control`s ID in the asyncpostback trigger list.
If you need more help doing this, please send some code form the aspx