I know this question has been asked many times. I went through all the solutions and nothing helped. Hence, am posting a question as a last resort! I am using a popup extender to input email address. There are two buttons in the control,one to submit the email address the other to cancel the action and hide the popup. The send button click event doesn't seem to fire at all! attached below is my code. The popup is in the master page(Home.Master) design. Am calling it in the login.aspx page which uses home.master as its master page.
<div>
<asp:ModalPopupExtender ID="idPopupExtend" runat="server" TargetControlID="lblPopupMsg"
PopupControlID="popUpPanel"
BackgroundCssClass="modalBackground"
DropShadow="true">
</asp:ModalPopupExtender>
<asp:Panel Width="338px" ID="popUpPanel" runat="server" CssClass="widget">
<div id="loginform">
<table>
<tr>
<td colspan="2">
<asp:Label ID="lblPopupMsg" runat="server" Text="" class="control-label"></asp:Label>
</td>
</tr>
<tr>
<td><span class="txt">Email Address <span class="redstar">*</span> : </span></td>
<td>
<asp:TextBox ID="txtEmail" runat="server" placeholder=" Email Address" CssClass="span4" Width="190px" Height="29px"></asp:TextBox>
<br />
</td>
</tr>
<tr style="height: 8px">
<td></td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="btnSend" runat="server" Text="Send" class="btn btn-sm btn-info" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" class="btn btn-sm" />
</td>
</tr>
</table>
</div>
</asp:Panel>
</div>
Login Page code where am calling the showing the popup:
Panel pnlpopup;
Table Tbl = new Table();
Button btncancel = new Button();
Label lbMessage = new Label();
Label lbMessageConfirm = new Label();
ModalPopupExtender popupExtend = new ModalPopupExtender();
Button btnSend = new Button();
protected void lnkForgotPassword_Click(object sender, EventArgs e)
{
Control ctrlForm = new Control();
ctrlForm = Master.FindControl("form1");
pnlpopup = new Panel();
pnlpopup = (Panel)ctrlForm.FindControl("popUpPanel");
pnlpopup.Visible = true;
popupExtend = (ModalPopupExtender)ctrlForm.FindControl("idPopupExtend");
btnSend = (Button)ctrlForm.FindControl("btnSend");
popupExtend.Show();
}
the btnsend event is not firing at all.. the initialization for the event has been done in the page load event. Please help! Thanks