带有ModalPopUpExtender的文本框在首次加载时被禁用 [英] Textbox with ModalPopUpExtender is disabled on first time load

查看:77
本文介绍了带有ModalPopUpExtender的文本框在首次加载时被禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我遇到了奇怪的问题.在我的页面上,我有2个链接(链接A和链接B)和2个ModalPopUpExtender.单击链接A时将调用模式1,而单击链接B时将调用模式2.

模式1包含1个文本框和2个按钮(确定和取消)
模式2仅包含一个确定按钮.

如果在页面加载后单击链接A,则模式1中的文本框处于禁用模式.如果我们单击链接B并在模式2中说确定,然后再次单击链接A,则启用文本框.

我希望文本框在每次调用时都处于启用模式.

无论是在回发中,在代码隐藏中还是在属性文本框中,均未启用enabled = false.


谁能建议我解决方案.

Hi all,

I am running with strange problem. On my page i have 2 links(link A & link B) and 2 ModalPopUpExtender. Modal 1 is called when link A is clicked and Modal 2 is called when link B is clicked.

Modal 1 contain 1 textbox and 2 button(ok and cancel)
Modal 2 contains only one ok button.

If after page load link A is clicked textbox inside Modal 1 is in disable mode. While if we click Link B and say ok in Modal 2 and again if we go to Link A then textbox is enabled.

I want textbox to be in enabled mode whenever it is called.

Neither in postback, in codebehind or through properties textbox enabled=false is set.


Can anyone suggest me with possible solutions.

推荐答案

嗨 Sushma,

更新后的答案:
使用以下代码:
Hi Sushma,

Updated Answer:
Use following code:
<ajaxToolkit:ModalPopupExtender ID="mpeDecline" runat="server" TargetControlID="pnlDecline"

    PopupControlID="pnlDecline" BehaviorID="bDecline" CancelControlID="lbtnClose"

    OnCancelScript="closeClick('bDecline');" BackgroundCssClass="modalBackground"

    DropShadow="true" />
<asp:Panel runat="server" ID="pnlDecline" CssClass="modalPopup" Style="display: none;
    width: 400px;">
    <asp:Panel runat="Server" ID="pnlConnectDragHandle" CssClass="modalPopupPanel">
        <asp:Literal ID="ltrPurchaseCredits" runat="server" Text="<%


资源:CommonResource,拒绝 > < /asp:文字 > < /asp:Panel > < =" 100%" 单元格填充 5" 单元格间距 =" 0" 边框 0" < tr > < td =" 宽度:26%" < asp:Literal ID =" runat 服务器" 文本 <%
Resources:CommonResource, Decline %>"> </asp:Literal> </asp:Panel> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> <td style="width: 26%"> <asp:Literal ID="ltrProjectName" runat="server" Text="<%


资源:CommonResource,ProjectName > < /asp:文字 > < /td > < td =" < asp:Label 运行 =" ID lblProjectName " 文本 " < /asp:标签 > < /td > < /tr > < tr > < td > < asp:Literal ID =" runat 服务器" 文本 <%
Resources:CommonResource, ProjectName %>"> </asp:Literal> </td> <td style="width: 74%"> <asp:Label runat="server" ID="lblProjectName" Text=""></asp:Label> </td> </tr> <tr> <td> <asp:Literal ID="ltrBuyerReason" runat="server" Text="<%


这篇关于带有ModalPopUpExtender的文本框在首次加载时被禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆