Hi
I have used a modal popup extender for a link button which is inside the gridview now when i click the link button i get the modal popup but the link button event is not getting fired how can it be done pl refer my code and tell me
modal popup extender:
<asp:TemplateField HeaderText="Reject">
<ItemTemplate>
<asp:LinkButton ID="lnkReject" runat="server" onclick="lnkReject_Click">Reject</asp:LinkButton>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" CancelControlID="btnCancel" runat="server" TargetControlID="lnkReject"
PopupControlID="Panel1" Drag="true" PopupDragHandleControlID="PopupHeader" >
</cc1:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
Event which should be fired
protected void lnkReject_Click(object sender, EventArgs e)
{
try
{
LinkButton lnkReject = (LinkButton)sender;
GridViewRow gvRowApprove = (GridViewRow)lnkReject.NamingContainer;
LinkButton lnkAssid = (LinkButton)gvRowApprove.FindControl("lnkAssId");
Label lblleaveType = (Label)gvRowApprove.FindControl("lblLeaveType");
int leaveId = objApproveOrReject.getLeaveReqId(lnkAssid.Text.Trim(), "pending", lblleaveType.Text);
Session["LeaveType"] = lblleaveType.Text;
Session["leaveId"] = leaveId;
string url = "lms_Rejection.aspx";
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "openPopup", "window.open('" + url + "','_blank','height=400,width=400,status=yes,toolbar=no,menubar=no,location=yes,scrollbars=yes,resizable=no,titlebar=no' );", true);
}
catch (Exception ex)
{
throw (ex);
}
}