Hi all
i have a web panel. Inside web panel i have a Button. On Button Click i am changing the Expanded State of WebPanel. But web Panel's status is not changing. Although Asyncronous Post back is hapening but web panel's expanded state remains unchanged. do i have to place web panel in WRAP?
Muhammad Jassim Munir said: Hi all i have a web panel. Inside web panel i have a Button. On Button Click i am changing the Expanded State of WebPanel. But web Panel's status is not changing. Although Asyncronous Post back is hapening but web panel's expanded state remains unchanged. do i have to place web panel in WRAP?
can any body answer me
I don't understand your setup. How is the button triggering an asynchronous callback? Is it in a WARP already?
No, Button is simply in WebPanel. Do i have to place Web Panel and Button both in Seperate WARPs?
What I notice is that your WebPanel is not inside your UpdatePanel. Any changes you make to the WebPanel during the async callback handled in the UpdatePanel won't be reflected. You'd see the same behavior if you were using WARP instead of UpdatePanel.
I don't myself know how to configure UpdatePanel to update a control outside of it, nor do I know whether or not it's possible. If you were using WARP, you could set its RefreshTargetID property to the ClientID of the WebPanel, or you could put the WebPanel in another WARP and use the LinkedRefreshControlID property so that one refreshes the other during their async callbacks.
Dear Mr. Vince McDonald
i m sorry that i forgot to mention that i have used UpdatePanel in WebPanel , thats why button click is causing asynchronous postback.
Here is my Code which i m calling on Button Click:
{
wpnlMRDocument.Expanded = fasle; //but it is not working.
}
Here is Aspx code:
StyleSetName="Office2007Blue" Width="99%">
<Header Text="MR Document" TextAlignment="Left">
<ExpandedAppearance>
<Styles CssClass="webPanel_InnerStyle" Cursor="Hand" Font-Bold="true">
</Styles>
</ExpandedAppearance>
</Header>
<Template>
<table style="width: 100%">
<tr>
<td>
</td>
</tr>
Width="99%">
<asp:UpdatePanel ID="upnlGeneralMR" runat="server" >
<ContentTemplate>
<td colspan="3">
Text="Reset For All Levels?" />
</td>
<td width="5%">
oncheckedchanged="chkPrefixMR_CheckedChanged" Text="Prefix" />
<td width="20%">
CssClass="inputTextOutsideGrid" Enabled="False"
ontextchanged="txtPrefixMR_TextChanged" Width="40px"></asp:TextBox>
oncheckedchanged="chkSuffixMR_CheckedChanged" Text="Suffix" />
<td width="70%">
ontextchanged="txtSuffixMR_TextChanged" Width="40px"></asp:TextBox>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</Template>
</igmisc:WebGroupBox>
Text="Format" Width="99%">
<asp:UpdatePanel ID="upnlFormatMR" runat="server" UpdateMode="Conditional">
<td width="30%">
Width="40px"></asp:TextBox>
CssClass="inputTextOutsideGrid" Width="50px"></asp:TextBox>
<asp:Label ID="Label37" runat="server" Text="Sample="></asp:Label>
<asp:Label ID="lblSampleNumberingMR" runat="server"></asp:Label>
<asp:Label ID="Label38" runat="server" Text="'X' = Autogenerate No."></asp:Label>
<br />
<asp:Label ID="Label39" runat="server" Text="'-' = Seperator"></asp:Label>
<td align="right">
<table cellpadding="0" cellspacing="0" style="width: 40%">
Text="Save" onclick="btnSaveMRCoding_Click" />
Text="Cancel" />
</igmisc:WebPanel>
i think i have to replace updatepanel with warp?
I still don't understand the setup, which is preventing me from determining if the suggestion will be useful or not.
Your first post mentions that clicking the button is causing an asynchronous postback, but I don't understand how that's happening unless the button is already in a WARP (or an UpdatePanel).
Can you post the markup from your ASPX file showing the setup of your page?