I have a ASP.net button btnAccept in a panel control which will be shown on Click of Another button in a modalViewextender control.
The btnAccept control onclick is not firing. But if I put onClientClick it is firing. But I want to work onClick at the server end. I am not getting any errors and I am not able to figure this out.
Any help will be greatly appreciated.
Below is the code for the button
<cc1:ModalPopupExtender ID="mdldigiSign" runat="server" Enabled="True"
BackgroundCssClass="modalBackground" TargetControlID="pnlSign"
PopupControlID="pnlSign" CancelControlID="lblCloseSign"
OnCancelScript="hideDigiSignDialog();" DynamicServicePath="">
</cc1:ModalPopupExtender>
<asp:Panel ID="pnlSign" runat="server">
<table border="0" class="SubMenu" align=center >
<tr>
<td align="right" valign="top" style="height: 30px">
<label id="lblCloseSign" runat="server" title="Close">
<a href="#">
<img src="images/close_button.gif" border="0"
alt="Close" />
</a>
</label>
</td>
</tr>
<tr><td>Respondent's Signature</td></tr>
<tr>
<td align=center >
<OBJECT id=esCapture1
classid=clsid:84C046A7-4370-4D91-8737-87C12F4C63C5
width="150" height="80" codebase="websignax.cab" VIEWASTEXT>
<param name="useslibrary" value="websignAx">
<param name="useslibrarycodebase" value="websignax.cab">
<param name="useslibraryversion"
value="7,1,0,1">IntegriSign Signature Control
</OBJECT>
<br />
<br />
<INPUT onclick=signNow() type=button value="StartSign"
name=B1 id=B1>
<input type="button" value="GetData" name="B2"
onclick=getData()>
<br />
<asp:HiddenField ID="hdsignature" runat=server />
</td>
</tr>
<tr>
<td align="center">
<asp:Button ID="btnAccept" runat="server"
Text="Accept Settlement" />
</td>
</tr>
</table>
</asp:Panel>
Thanks
Without seeing any code (which would really help us), I'm going to guess that you are dynamically adding your btnAccept to the page, and not recreating it properly on the postback.
If you're not creating btnAccept during the Init phase of the lifecycle, then you'll have to track its ViewState manually. If you're not creating it until PreRender(), then you'll be past the point at which event handlers have fired.
If you post some code it would be a lot easier to diagnose.
Probably the page directive hast this setting: eventwireup="false". If this is true the event will not fire.
As womp already said - would be helpfull to see the code. Could you include the page directive in your posting?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With