English 中文(简体)
模式流行推广器没有在纽顿点上显示小组
原标题:modal popup extender not showing panel on button click

当我点击一个 but子时,我试图在我的网页上使用一个模式的流行延伸器,我必须显示一个小组。 在这方面,我已经:

    <asp:UpdatePanel runat="server" ID="updPanel">
    <ContentTemplate>
        <ajaxToolkit:ModalPopupExtender ID="mpeEmailComplete" runat="server" TargetControlID="btnTesting"
            PopupControlID="pnl" OkControlID="btnOk"
             BackgroundCssClass="modalBackground">
        </ajaxToolkit:ModalPopupExtender>



        <asp:Panel ID="pnl" runat="server" style="display:none;">
            <asp:UpdatePanel ID="udp" runat="server">
                <ContentTemplate>
                    <asp:Panel runat="server" ID="pnlEmailComplete" Visible="false">
                        <asp:Label runat="server" ID="lblTest" Text="Testing testing testing"></asp:Label>
                        <asp:Button runat="server" ID="btnOk" Text="OK" />
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>


        <asp:Button runat="server" ID="btnTesting" Text="Testing"/>

    </ContentTemplate>
</asp:UpdatePanel>

但是,当纽特被点击时,可以让小组坐下来。 任何人都知道为什么?

问题回答

你的内心小组有可见的=。

<asp:Panel runat="server" ID="pnlEmailComplete" Visible="false">  *(change here)*

因此,当你发布TESating button时,ModalPopupExtender正确地使外部小组展示,但显示一个看不见的内部小组,因此你看不到任何屏幕。

<asp:Panel ID="pnl" runat="server" style="display:none;">  *(this is ok)*

To fix, just yank the Visible=false from the outer panel (pnlEmailComplete)

Hope that helps!

页: 1 Visible=False; set on the Service-side any处?

确保有<代码>。 适当参考的AjaxControlToolkit,NuGet是添加该参考内容的最容易的方法。

http://nuget.org/ Packages/ajax Controltoolkit

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Button ID="Btnshow" runat="server" Text="Show" OnClick="Btnshow_Click" />
        <asp:Button ID="BtnTarget" runat="server" Text="Target" Style="display: none" />
        <asp:TextBox ID="TextBox1" runat="server">
        </asp:TextBox>
        <input type="button" value="Get" onclick="abc()" />
        <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="BtnTarget"
            PopupControlID="Panel1">
        </asp:ModalPopupExtender>
        <asp:Panel ID="Panel1" runat="server" BackColor="Black" Width="300px" Height="300px">
            <asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Button ID="BtnHide" runat="server" Text="Hide Button" OnClick="BtnHide_Click" />
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="BtnHide" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
        </asp:Panel>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="Btnshow" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签