通过模态扩展器(ajax)显示面板的问题 [英] Problem With showing panel by modal extender (ajax)

查看:81
本文介绍了通过模态扩展器(ajax)显示面板的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,,



我在链接上显示面板有问题点击

例如:

当我按下HyperLink(注册账号)时,它应该通过modalpopupextender显示我的面板



以下是我的完整代码...



在此先感谢:)

Hello ,,

am having a problem with showing the panel on Link Click
for example :
when i press on HyperLink (Register Account ) it should show my panel by modalpopupextender

Below is my full Code ...

Thanks In Advance :)

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckPoint.aspx.cs" Inherits="Home.CheckPoint" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AJAX" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Check Point</title>

    <link href="login-box.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
        .style1
        {
            font-size: large;
        }
        
        .modalBackground
        {      
            background-color:#333333;
            filter:alpha(opacity=80);
            opacity:2;
        }
         #loginform
        {
            min-width:200px;
            height:110px;
            background-color:#ffffff;
            border:1px solid;
            border-color:#555555;
            padding:16px 16px;
            border-radius:4px;
            -webkit-box-shadow: 0px 1px 6px rgba(75, 31, 57, 0.8);
            -moz-box-shadow:     0px 1px 6px rgba(75, 31, 57, 0.8);
            box-shadow:              0px 1px 6px rgba(223, 88, 13, 0.8);
        }
    </style>

</head>
<body>
    <form id="form1" runat="server">
    <div>
    <div style="padding: 100px 0 0 250px;">


<div id="login-box">

<H2>Login</H2>
<br />
<br />
<div id="login-box-name" style="margin-removed20px;">UserName:</div><div id="login-box-field" style="margin-removed20px;">
    <asp:TextBox ID="txtUserName" CssClass="form-login" runat="server"></asp:TextBox></div>
<div id="login-box-name">Password:</div><div id="login-box-field">
    <asp:TextBox ID="txtPassword" CssClass="form-login" runat="server"></asp:TextBox></div>
<br />
<span class="login-box-options"><input type="checkbox" name="1" value="1"> Remember Me <a href="#" style="margin-removed30px;">Forgot password?</a></span>
<br />
<span class="login-box-options">         
    <asp:HyperLink ID="HLRegister" NavigateUrl="#" runat="server">Register Account</asp:HyperLink></span>
    <br />
<br />
<br />
    
    <asp:ImageButton ID="btnLogin" runat="server" width="103" height="42" 

        style="margin-left:90px;" ImageUrl="~/images/login-btn.png" 

        onclick="btnLogin_Click" />




</div>

</div>
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
            <AJAX:ModalPopupExtender 

    ID="MPE"

    TargetControlID="HLRegister"

    PopupControlID="PanelRegister"

    BackgroundCssClass="modalBackground"

    DropShadow="true"

    CancelControlID="brncancel"

    BehaviorID="MPE"

     runat="server"></AJAX:ModalPopupExtender>
    

    <asp:Panel ID="PanelRegister" runat="server">
    Register New User / تسجيل مستخدم جديد
    <div id="loginform">
    
    <table class="style1">
                <tr>
                    <td class="style9">
                        First Name</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewFirstName" runat="server" Width="260px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 

                            ControlToValidate="txtNewFirstName" CssClass="style15" ErrorMessage="*" 

                            ValidationGroup="newuser" style="color: #CC0000"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        Middile Name</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewMidName" runat="server" Width="260px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 

                            ControlToValidate="txtNewMidName" CssClass="style15" ErrorMessage="*" 

                            ValidationGroup="newuser" style="color: #CC0000"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        Last Name</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewLastName" runat="server" Width="260px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 

                            ControlToValidate="txtNewLastName" CssClass="style15" ErrorMessage="*" 

                            ValidationGroup="newuser" style="color: #CC0000"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        User Name</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewUserName" runat="server" Width="260px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 

                            ControlToValidate="txtNewUserName" CssClass="style15" ErrorMessage="*" 

                            ValidationGroup="newuser" style="color: #CC0000"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        Password</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewPassword" runat="server" Width="260px" 

                            TextMode="Password"></asp:TextBox>
                    </td>
                    <td>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" 

                            ControlToCompare="txtNewPassword" ControlToValidate="txtNewConfirmPassword" 

                            CssClass="style15" ErrorMessage="Password Doesn't Match !!" 

                            ValidationGroup="newuser" style="color: #CC0000"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        Confirm Password</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewConfirmPassword" runat="server" Width="260px" 

                            TextMode="Password"></asp:TextBox>
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style9">
                        E-mail</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewEmail" runat="server" Width="260px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:CompareValidator ID="CompareValidator2" runat="server" 

                            ControlToCompare="txtNewEmail" ControlToValidate="txtNewConfirmEmail" 

                            CssClass="style15" ErrorMessage="Email Doesn't Match !!" 

                            ValidationGroup="newuser" style="color: #CC0000"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        Confirm E-mail</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewConfirmEmail" runat="server" Width="260px"></asp:TextBox>
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style9">
                        Gender</td>
                    <td class="style8">
                        <asp:DropDownList ID="dropNewGender" runat="server" Width="264px">
                            <asp:ListItem Value="0">Male</asp:ListItem>
                            <asp:ListItem Value="1">Female</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style9">
                        Country</td>
                    <td class="style8">
                        <asp:DropDownList ID="dropNewCountry" runat="server" Width="264px">
                            <asp:ListItem>Jordan</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style12">
                        City</td>
                    <td class="style13">
                        <asp:DropDownList ID="dropNewCity" runat="server" Width="264px">
                            <asp:ListItem>Amman</asp:ListItem>
                            <asp:ListItem>Zarqa</asp:ListItem>
                            <asp:ListItem>Irbid</asp:ListItem>
                            <asp:ListItem>Aqaba</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td class="style14">
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        Mobile No.</td>
                    <td class="style8">
                        <asp:TextBox ID="txtNewMobileNo" runat="server" Width="260px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 

                            ControlToValidate="txtNewMobileNo" CssClass="style15" ErrorMessage="*" 

                            ValidationGroup="newuser" style="color: #CC0000"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        Status</td>
                    <td class="style8">
                        <asp:DropDownList ID="dropNewStatus" runat="server" Width="264px">
                            <asp:ListItem>Single</asp:ListItem>
                            <asp:ListItem>Married</asp:ListItem>
                            <asp:ListItem>Engaged</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style9">
                        Work</td>
                    <td class="style8">
                        <asp:DropDownList ID="dropNewWork" runat="server" Width="264px">
                            <asp:ListItem>Student</asp:ListItem>
                            <asp:ListItem>Employee</asp:ListItem>
                            <asp:ListItem>HouseWife</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style9">
                         </td>
                    <td class="style3">
                         </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style9">
                         </td>
                    <td class="style3">
                                   
                        <asp:Button ID="btnNewRegister" runat="server" Text="Register" width="118px" 

                            ValidationGroup="newuser" />
                             
                        <asp:Button ID="brncancel" runat="server" Text="Cancel" 

                            Width="124px" onclick="brncancel_Click" />
                    </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style11">
                         </td>
                    <td class="style3">
                         </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td class="style11">
                         </td>
                    <td class="style3">
                         </td>
                    <td>
                         </td>
                </tr>
                <tr>
                    <td colspan="3" style="background-color: #2980A1">
                         </td>
                </tr>
            </table>
     </div>
    </asp:Panel>
    </form>
</body>
</html>

推荐答案

I Found the solution it was with my AjaxToolKit.dll File i was using 4.0 edition i changed it to 3.0 and it worked ...



i’ll keep the question so any one can use it :)
I Found the solution it was with my AjaxToolKit.dll File i was using 4.0 edition i changed it to 3.0 and it worked ...

i'll keep the question so any one can use it :)


这篇关于通过模态扩展器(ajax)显示面板的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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