Hi All,
I have modalpopupextender in updatepanel which is in usercontrol.
<asp:ModalPopupExtender ID="mpeConfirmNames" runat="server" TargetControlID="hlPopName"
PopupControlID="pnlConfirmNames" BackgroundCssClass="modalBackground" CancelControlID="btnConfirmNamesCancel" />
<asp:Panel ID="pnlConfirmNames" runat="server" Style="text-align: left; width: 450px;
background-color: #EFF3FB; border-width: 2px; border-color: gray; border-style: solid;
padding: 10px;">
Please confirm that First and Last names are spelt as they appear on your Passport
as name correction fees may apply or you may be denied boarding.
<br />
<br />
<asp:Label ID="lblTest" runat="server" />
<div align="center" id="grdUser">
<asp:GridView ID="UserGridView" runat="server" AutoGenerateColumns="False" Width="90%">
<HeaderStyle BackColor="#BFE2F9" Font-Bold="true" Font-Size="12px" ForeColor="#000000" />
<Columns>
<asp:BoundField HeaderText="First Name" DataField="Firstname" />
<asp:BoundField HeaderText="Middle Name" DataField="Midname" />
<asp:BoundField HeaderText="Last Name" DataField="Lastname" />
<asp:TemplateField HeaderText="DOB">
<ItemTemplate>
<%# Eval("Day") + "/" + Eval("Month") + "/" + Eval("Year")%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<asp:Label ID="lblUserName" runat="server" />
<div style="text-align: center;">
<asp:Button ID="btnConfirmNamesCancel" runat="server" Text="Change" TabIndex="0"
OnClick="btnConfirmNamesCancel_Click" />
<asp:Button ID="btnConfirmNamesOK" runat="server" Text="Confirm" TabISndex="1" OnClick="btnConfirmNamesOK_Click" />
</div>
</asp:Panel>
<asp:Button ID="hlPopName" runat="server" Visible="false" />
LoadSummary() takes few seconds to process so I want to disable button(btnConfirmNamesOK) Or hide the modalpopupextender.
I have tried codebehind
protected void btnConfirmNamesOK_Click(object sender, EventArgs e)
{
mpeConfirmNames.Hide();
LoadSummary();
}
also tried
Javascript to disable button but didn't work!
function disableButton() {
var arrInputs = document.getElementById('<%= btnConfirmNamesOK.ClientID%>');
arrInputs.disabled = true
}
<asp:Button ID="btnConfirmNamesOK" runat="server" Text="Confirm" TabISndex="1" OnClick="btnConfirmNamesOK_Click" OnClientClick="window.setTimeout('disableButton()',0); return true" Text="OK"/>
Best Regards,
Damodar