模态弹出式扩展器不显示

模态弹出式扩展器不显示

本文介绍了模态弹出式扩展器不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的项目(具有MasterPage)上进行Modal Popup Extender.但是,不会显示弹出窗口.您认为出了什么问题?我按照asp.net上的演示视频上的说明进行操作.但是弹出窗口仍然不显示.




<%@主语言="C#" AutoEventWireup ="true" CodeFile ="Masteraras.master.cs" Inherits ="Masteraras"%>
<%@注册命名空间="AjaxControlToolkit" Assembly ="AjaxControlToolkit" tagPrefix ="cc1"%>

I tried to do the Modal Popup Extender on my project (which has a MasterPage). However the pop up does not show. What do you think is the problem? I followed the instructions on the demo video on asp.net. But the popup still does not show.




<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Masteraras.master.cs" Inherits="Masteraras" %>
<%@ Register Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" tagPrefix="cc1" %>

<div >

   <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderLogin" runat="server"

             TargetControlID="Loginlnk"

             PopupControlID="LoginPanel"

             BackgroundCssClass="modalBackground"

             DropShadow="true"

             OkControlID="LoginBtn"

             OnOkScript="ok()"

             CancelControlID="CancelBtn"



             X="650"  Y="140"

            />



   <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderSignup" runat="server"

             TargetControlID="Signuplnk"

             PopupControlID="SignupPanel"

             BackgroundCssClass="modalBackground"

             DropShadow="true"

             OkControlID="Button1"

              OnOkScript=""

             CancelControlID="CancelBtn2"





              />



   <asp:Panel ID="LoginPanel" runat="server" CssClass="modalPopup"  Width="270px" Font-Names="tahoma">

      <table style="width: 270px" dir="ltr" >
                <tr>
                    <td align="right" class="style17">
                        <asp:TextBox ID="TnameLogin" runat="server" Width="80%" CssClass="SFEditBox">
                          </asp:TextBox>

                    </td>

                    <td style="width: 179px" class="SFLable" >
                            <asp:Label ID="Label10" runat="server" AutoPostBack="true" ontextchanged=""  Height="23px" Text=": نام کاربری" style="font-family: Tahoma; font-size: small; color: #0000FF; "

                               ></asp:Label>
                      </td>
                    </tr>
                <tr>
                    <td align="right" class="style17">
                        <asp:TextBox ID="pwd" runat="server" Width="80%" TextMode="Password"

                            CssClass="SFEditBox"></asp:TextBox>
                        </td>

                    <td style="width: 179px" class="SFLable">
                       <asp:Label ID="Label9" runat="server" Height="23px" Text=": رمز عبور"

                            style="color: #0000FF; font-family: Tahoma; font-size: small;"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style17">

                        <asp:Button ID="CancelBtn" runat="server" Text="خروج" Width="52px"

                            buttonAction="submitButton" style="color: #0000FF"

                            CssClass="BinsertBook" />
                        <asp:Button ID="LoginBtn" runat="server" Text="ورود" OnClick="LoginBtn_Click"

                            buttonAction="cancelButton" style="color: #0000FF" Width="61px"

                            CssClass="BinsertBook" />
                    </td>
                    <td style="width: 179px">

                        &nbsp;</td>
                         </tr>
                <tr>
                    <td class="style16" colspan="2">

                        <span class="style23">&nbsp;&nbsp;
                             </span>
                             <asp:LinkButton id="LinkButton1"  PostBackUrl="~/Default.aspx"

                            runat="server" style="font-family: Tahoma; " CssClass="style24"> فراموشی رمز عبور </asp:LinkButton>
                           <span class="style23">&nbsp;</span><span class="style25">*</span><span

                            class="style23">&nbsp;
                    </span>
                    </td>
                         </tr>
                          </table>


  </asp:Panel>

 <asp:Panel ID="SignUpPanel" runat="server" CssClass="modalSignUp"

        align="center"   Width="550px"

        Font-Names="Tahoma">

                <table style="height:177px; width: 555px; background-color: #FFCCCC;" dir="ltr"

                    align="center">
                <tr>
                    <td

                        class="SFTdCenter" colspan="3">
                        <asp:Label ID="Label111" runat="server"

                            style="color: #0066FF; font-size: large" Text="ثبت نام"></asp:Label>
                        </td>
                </tr>



                <tr>
                  <td align="right" class="style29" colspan="2">
                        <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                          <ContentTemplate>
                                      <asp:TextBox ID="TxtFullName" runat="server" CssClass="SFEditBox" Width="270px"></asp:TextBox>
                          </ContentTemplate>
                          </asp:UpdatePanel>
                    </td>
                    <td class="style30" >
                        <asp:Label ID="Label105" runat="server" Text=": نام و خانوادگی "></asp:Label>
                    </td>
                </tr>
               <tr>
                <td align="right" class="style29" colspan="2">

               <%-- <div ID="checkusername"  runat="server"   visible="false"  >--%>


                     <asp:UpdatePanel  ID="PnlUsrDetails" runat="server">
                     <ContentTemplate>
                                <asp:Image ID="ImstautsOk" runat="server" Height="15px"

                                 ImageUrl="~/pic/image001.gif"  Visible="False"  Width="19px" />

                                <asp:Label ID="LloginUser" runat="server"

                                    style="color: #FF0000; font-size: x-small;"></asp:Label>


                     <asp:TextBox ID="TxtUser" runat="server" Width="270px"

                        CssClass="SFEditBox" ontextchanged="txtPassword_TextChanged"

                         AutoPostBack="true"></asp:TextBox>
                        </ContentTemplate>
                         </asp:UpdatePanel>
                     </td>

                 <%-- </div>--%>
                                 <td style="text-align: left" class="style32">

                            <asp:Label ID="Label106" runat="server" Text=": نام کاربری" CssClass="SFLable"></asp:Label>
                  </td>

                     </tr>


                <tr>
                    <td align="right" class="style29" colspan="2">


                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>

                                <asp:Image ID="ImStatusEmail" runat="server" EnableViewState="False"

                                    Height="15px" ImageUrl="~/pic/Refresh.jpg" Visible="False" />
                                <asp:Label ID="LStatusEmail" runat="server" style="font-size: x-small"></asp:Label>
                                <asp:TextBox ID="TxtEmail" runat="server" CssClass="SFEditBox"

                                    ontextchanged="TxtEmail_TextChanged" ValidationGroup="b" onblur="if(this.value!=''){ValidEmail(this)}"   Width="270px"   AutoPostBack="true"></asp:TextBox>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>


                    <td class="style30">
                        <asp:Label ID="Label107" runat="server" Text=": پست الکترونیک را بنویس"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="style29" colspan="2">

                        <asp:Image ID="ImstautsConfEmail" runat="server" Height="15px"

                            ImageUrl="~/pic/Refresh.jpg" Visible="False" Width="19px" />
                        <asp:Label ID="LConfEmail" runat="server"

                            style="color: #FF0000; font-size: x-small;"></asp:Label>
                        <asp:TextBox ID="TxtConfEmail" runat="server" CssClass="SFEditBox"

                            Width="270px"></asp:TextBox>

                     </td>
                    <td class="style30">
                        <asp:Label ID="Label108" runat="server" Text=": تایید پست الکترونیک"></asp:Label>


                    </td>

                </tr>
                <tr>
                    <td align="right" class="style29" colspan="2">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                          <ContentTemplate>

                         <asp:Image ID="Impass" runat="server" Height="16px" ImageUrl="~/pic/image001.gif" />
                        <asp:Label ID="Lpass" runat="server" style="font-size: x-small"></asp:Label>
                        <asp:TextBox ID="Txtpass" runat="server" CssClass="SFEditBox"

                            TextMode="Password" Width="270px"></asp:TextBox>

                          </ContentTemplate>
                        </asp:UpdatePanel>

                                           </td>
                    <td class="style30">
                        <asp:Label ID="Label109" runat="server" Text=": رمز عبور"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="style29" colspan="2">
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                       <ContentTemplate>
                        <asp:Image ID="Imgrepass" runat="server" Height="16px"

                               ImageUrl="~/pic/Refresh.jpg" />
                        <asp:Label ID="Lreppass" runat="server" style="font-size: x-small"></asp:Label>
                        <asp:TextBox ID="TxtConfPass" runat="server" CssClass="SFEditBox"

                            TextMode="Password" Width="270px"></asp:TextBox>
                        </ContentTemplate>
                      </asp:UpdatePanel>
                    </td>
                    <td class="style30">
                        <asp:Label ID="Label110" runat="server" Text=": تکراررمز"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style28">
                        &nbsp;</td>
                    <td class="style21">
                      <asp:Button ID="CancelBtn2" runat="server" Text="خروج" Width="52px"

                          CssClass="BinsertBook" />
                          <asp:Button ID="Button1" runat="server" onclick="Button1_Click"

                            Text="Button" />
                    </td>
                    <td style="width: 179px; height: 26px;">
                        &nbsp;</td>
                </tr>
            </table>


    </asp:Panel>
      </div>

推荐答案

<cc1:ModalPopupExtender ID="ModalPopupExtenderLogin" runat="server"
          TargetControlID="Loginlnk"
          PopupControlID="LoginPanel"
          BackgroundCssClass="modalBackground"
          DropShadow="true"
          OkControlID="LoginBtn"
          OnOkScript="ok()"
          CancelControlID="CancelBtn"

          X="650"  Y="140"
         />


这篇关于模态弹出式扩展器不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 15:44