G
Guest
I have an UpdatePanel with a dropdown list that I can't seem to get to
update. It has a hidden button which I click from javascript added to the
page when another update panel is updated. Triggers didn't work for this that
is why I'm using the script.
The script is registered with...
ScriptManager.RegisterStartupScript(Page, GetType(), "Update",
String.Format("$get('{0}').click();", buttontoclick.ClientID), true);
<asp:UpdatePanel ID="panel" UpdateMode="Conditional"
ChildrenAsTriggers="true" runat="server">
<ContentTemplate>
<asp:Button ID="dropdownButton" runat="server" Style="display:
none;" OnClick="dropdown_Click" />
<aspropDownList ID="dropdown" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
The code all executes and the data for the drop down is updated but it is
never rendered to the page. I put a text box in the panel just to see if
anything was getting updated and it wasn't.
I have another update panel that is updated in similar fashion to this but
its datasource is a repeater. It has the same issue. The data is updated but
never rendered.
I have other update panels on the page and they update just fine. I'm not
sure what the problem with these two panels are.
update. It has a hidden button which I click from javascript added to the
page when another update panel is updated. Triggers didn't work for this that
is why I'm using the script.
The script is registered with...
ScriptManager.RegisterStartupScript(Page, GetType(), "Update",
String.Format("$get('{0}').click();", buttontoclick.ClientID), true);
<asp:UpdatePanel ID="panel" UpdateMode="Conditional"
ChildrenAsTriggers="true" runat="server">
<ContentTemplate>
<asp:Button ID="dropdownButton" runat="server" Style="display:
none;" OnClick="dropdown_Click" />
<aspropDownList ID="dropdown" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
The code all executes and the data for the drop down is updated but it is
never rendered to the page. I put a text box in the panel just to see if
anything was getting updated and it wasn't.
I have another update panel that is updated in similar fashion to this but
its datasource is a repeater. It has the same issue. The data is updated but
never rendered.
I have other update panels on the page and they update just fine. I'm not
sure what the problem with these two panels are.