0
<tr>
    <td align="left">Have you asked the employee to leave without serving the notice period</td>
    <td align="left">
        <asp:RadioButton ID="rdoBtnleaveWoNoticeyes" runat="server" GroupName="Replacement" 
             Text="Yes" Font-Names="Arial" Font-Size="Small" AutoPostBack="true" 
             oncheckedchanged="rdoBtnleaveWoNoticeyes_CheckedChanged" /> &nbsp;
        <asp:RadioButton ID="rdoBtnleaveWoNoticeno" runat="server" GroupName="Replacement" 
             Text="No" Font-Names="Arial" Font-Size="Small"  AutoPostBack="true"
             oncheckedchanged="rdoBtnleaveWoNoticeno_CheckedChanged" />
    </td>
    <td align="left" colspan="2"><%--Remark--%>
    </td>
</tr>
<cc1:ModalPopupExtender ID="cc18_ModalPopupExtender" 
     runat="server" BackgroundCssClass="modalBackground" TargetControlID="rdoBtnleaveWoNoticeyes" PopupControlID="Panel18" CancelControlID="btnwonoticeperiod">
</cc1:ModalPopupExtender>
<asp:Panel ID="Panel18" runat="server" CssClass="modalPopup" Style="display: none;top:50px">
    <table width="90%" border="0" style="border-collapse:collapse;font-family: Arial; font-size: small" cellpadding="2" cellspacing="2">
        <tr><td align="left">
            <asp:Label ID="lbl_leaveWoNotice" runat="server" ></asp:Label>
             </td>
        </tr>
        <tr><td align="center">
            <asp:Button ID="btnwonoticeperiod" runat="server"  Text="Save" OnClick="btnPLAdjSave_Click" CssClass="clsButtonpopup" />&nbsp;
            <asp:Button ID="Button2" runat="server" Text="Cancel" CssClass="clsButtonpopup" />
        </td></tr>
    </table>
</asp:Panel>

我想在上面选中的 radiobtn 上显示模式弹出窗口是设计。下面是代码。我没有得到输出好心地建议 wat 是要完成的

protected void rdoBtnleaveWoNoticeyes_CheckedChanged(object sender, EventArgs e)
{
    if (rdoBtnleaveWoNoticeyes.Checked == true)
    {
        lbl_leaveWoNotice.Text = "As you have asked the employee to leave without serving notice, there will be no Notice recovery from employee and employee will receive his PL encashment treating this as “Ask to leave” case.";
        trNoticePayRecovery.Visible = true;
        cc18_ModalPopupExtender.TargetControlID = "rdoBtnleaveWoNoticeyes";
        cc18_ModalPopupExtender.Show();
    }
}

protected void rdoBtnleaveWoNoticeno_CheckedChanged(object sender, EventArgs e)
{
    lbl_leaveWoNotice.Text = "As process there will be Notice period shortfall recovery with PL bal adjustment from employee.";               
    trNoticePayRecovery.Visible = false;
    cc18_ModalPopupExtender.TargetControlID = "rdoBtnleaveWoNoticeno";
    cc18_ModalPopupExtender.Show();
}
4

1 回答 1

0

您没有获得所需的输出,因为您将在事件触发后分配 TargetControlID。只需删除以下行:

cc18_ModalPopupExtender.TargetControlID = "rdoBtnleaveWoNoticeno";


cc18_ModalPopupExtender.TargetControlID = "rdoBtnleaveWoNoticeyes";

也许它会帮助你。

于 2013-09-26T12:12:55.853 回答