I have an update panel set up with a trigger for an async post back. Here's the code:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:updatePanel ID="tableUpdate" runat="server" updatemode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CreateLinkToQuery" />
</Triggers>
<ContentTemplate>
<div>
<asp:Button ID="CreateLinkToQuery" CssClass="myButton" runat="server" Text="Create Link To Query" OnClick="CreateLinkToQuery_Click"/>
</div>
<div>
<asp:TextBox ID="QueryData" CssClass="popInnerContent" runat="server"/>
</div>
</ContentTemplate>
</asp:updatePanel>
And here is the codebehind:
protected void CreateLinkToQuery_Click(object sender, EventArgs e)
{
QueryData.Text = "wwww.whateverlinkIfeelLike.com";
}
When the button is clicked if I add the control to watch then it certainly updates it with the new text, however on the UI nothing happens and if I spy the control in Firefox it shows as being empty.
I cannot understand where i'm going wrong here.
1 thing to note that this update panel is within a JQuery dialog
Here is the code im using for that:
$('#CreateQuery').click(function (event) {
var dlg = $("#dialog").dialog({
width: 730,
minWidth: 730,
modal: true,
close: function (event, ui) {
$("#dialog").hide();
}
});
dlg.parent().appendTo(jQuery('form:first'));
});