2011-06-23 34 views
0

私はすべてをやった。コードを削除し、新しいコントロールをツールボックスからドラッグして名前を変更し、javascriptで試してみました - 私はこのfreakinのmodalpopupextenderを表示することはできません。 3日を無駄にした。ModalPopupがASP.Netに表示されない

Iは、オンクリックしてもログインボタンの中にVBコードビハインドを経由して、それを表示しようとしています。他のすべては、ボタンのコードで実行されるだけではない、この行:

しかし、関係なく、私がしようとするもの、それは隠された滞在して好きではありません。

どのようなアイデアも歓迎です!!!おかげで、

ジェイソン

PS - ここ

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Login.aspx.vb" Inherits="LetterWriterASP.Login" %> 

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html> 
<head id="Head2"><meta http-equiv="Expires" content="-1" /><title> 
Anchor General Insurance Agency, Inc. 
</title><meta http-equiv="Expires" content="-1" /><link rel="shortcut icon" href="Images/favicon.ico" /><link href="App_Themes/Default/Calendar.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Default/Default.css" type="text/css" rel="stylesheet" /> 
    </head> 

<style type="text/css"> 
    .ModalPopupBG 
    { 
    background-color: #666699; 
    filter: alpha(opacity=50); 
    opacity: 0.7; 
    } 

    .HellowWorldPopup 
    { 
    min-width:200px; 
    min-height:100px; 
    background:white; 
    border-color:Silver; 
    border-style:ridge; 
    border-width:medium; 

    } 
    .HeaderStyle 
    { 
    color:Black; 
    background-color:Black; 
    border-style:solid; 
    } 
    .PopupHeader 
    { 
    color:Black; 
    background-color: Black; 
    } 
</style> 


<body leftmargin="0" topmargin="0" 
background="Images/tile-grey-stripe.jpg"> 
<form id="Form1" runat="server"> 



    <table width="1000" height="99" border="0" align="center" cellpadding="0" cellspacing="0"> 
     <tr> 
      <td width="35" background="../Images/a_ag01.jpg"></td> 
      <td width="524"><img src="Images/a_ag1.jpg" alt="" width="524" height="99" border="0" align="top" /></td> 
      <td width="389"> 
       <table border="0" cellspacing="0" cellpadding="0" width="389"> 
        <tr> 
         <td width="218"><img id="imgHeader" src="Images/text_title_producer1.jpg" style="height:99px;width:218px;border-width:0px;" /></td> 
      <td width="111"><img id="imgHeadr2" src="Images/text_title-TILE.jpg" style="height:99px;width:171px;border-width:0px;" /></td> 
        </tr> 
       </table> 
      </td> 
      <td width="19" align="right"><img src="Images/a_ag4_end.jpg" width="19" height="99" alt="" /></td> 
      <td align="right" width="33" background="Images/a_ag5.jpg"></td> 
     </tr> 
    </table> 
    <!--end of the header table --> 
    <table height="702" width="1000" border="0" cellpadding="0" cellspacing="0" align="center"> 
     <tr> 
      <td width="50" background="Images/b_ag1_lefttile.jpg"> <!-- This is the left wall of the form !--> 
       &nbsp;</td> 
      <td width="900" valign="top" bgcolor="#FFFFFF"> 
<!-- Text, controls, buttons, etc goes below this comment. !--> 

<script type="text/javascript"> 

function InvalidLogin() 
{ 
alert("Invalid user name or password. Please try again."); 
window.location = "../Login.aspx"; 
} 

function ShowModal() 
{$find('ModalPopupExtender2').show();} 


</script> 



         <br /><br /><br /><br /><br /><br /><br /> 
         <center><table border="2" cellpadding="4" cellspacing="0" 
          style="border-collapse:collapse;"> 
          <tr> 
           <td> 
            <table border="0" cellpadding="0" style="height:172px;width:278px;"> 
             <tr> 
              <td align="center" colspan="2" 
               style="color:White;background-color:#5D7B9D;font-size:0.9em;font-weight:bold;"> 
               Log In</td> 
             </tr> 
             <tr> 
              <td align="right"> 
               <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User 
               Name:</asp:Label> 
              </td> 
              <td> 
               <asp:TextBox ID="UserName" Width="150" name="UserName" runat="server" Font-Size="0.8em"></asp:TextBox> 
               <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" 
                ControlToValidate="UserName" ErrorMessage="User Name is required." 
                ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator> 
              </td> 
             </tr> 
             <tr> 
              <td align="right"> 
               <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label> 
              </td> 
              <td> 
               <asp:TextBox ID="Password" Width="150" runat="server" Font-Size="0.8em" TextMode="Password"></asp:TextBox> 
               <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" 
                ControlToValidate="Password" ErrorMessage="Password is required." 
                ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator> 
              </td> 
             </tr> 
             <tr> 
              <td align="center" colspan="2" style="color:Red;"> 
               <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal> 
              </td> 
             </tr> 
             <tr> 
              <td align="right" colspan="2"> 
               <asp:Button ID="LoginButton" runat="server" BackColor="#FFFBFF" 
                BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" CommandName="Login" 
                Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" 
                onclick="LoginButton_Click1" Text="Log In" ValidationGroup="Login1" /> 
              </td> 
             </tr> 
            </table> 
           </td> 
          </tr> 
         </table>  </center>    


<!-- Text, controls, buttons, etc goes above this comment. !-->  
       <!--"#E6E2D8" "Black"-->  
      </td> 
      <td width="50" background="Images/b_ag1_righttile.jpg"> <!-- This is the right wall !--> 
       &nbsp;</td> 
     </tr> 
    </table> 
    <!--end of content table --> 
    <table height="75" width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> 
     <tr> 
      <td width="80" background="Images/c_ag1_leftcorner.jpg"></td> 
      <td width="840" align="center" valign="top" background="Images/c_ag1_center-piece.jpg" class="contents"> 
       <span id="lblFooter"><center>Copyright &#0169; 2006 Anchor General Insurance Agency, Inc. All rights reserved. <br />For questions, please call: (800) 542-6246</center></span> 
      </td> 
      <td width="80" background="Images/c_ag1_rightcorner.jpg"></td> 
     </tr> 
    </table> 







<!-- Popup Form --> 
<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server" EnablePageMethods="true"> 
         </asp:ToolkitScriptManager> 
<asp:button id="Button3" name="Button3" runat="server" text="Button" style="display: none;" /> 

<asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" 
targetcontrolid="Button3" popupcontrolid="PopupPanel" 
popupdraghandlecontrolid="PopupHeader2" drag="true" 
backgroundcssclass="ModalPopupBG"> 
</asp:ModalPopupExtender> 

<asp:Panel ID="PopupPanel" style="display: none" runat="server"> 
    <div class="HellowWorldPopup"> 
      <div class="PopupHeader" id="PopupHeader2">&nbsp;</div> 
      <div class="Controls"> 
       <center><table border=0 cellpadding=0 cellspacing=0><tr><td><img src="Images/ajax-loader.gif" /></td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please Wait...</td></tr></table></center> 
      </div> 
    </div> 
</asp:Panel> 


</form> 
</body> 
</html> 

答えて

0

コーディングASPXは(試行錯誤の非常に長いプロセスの後に)を見つけるために来て、誰もが知っておくべき少し何かがあります。

あなたは別のaspxページから

<ToolkitScriptManager> 

コードをコピーすることはできません。それをツールボックスからあなたのページにドラッグする必要があります。私たちは、私たちが見たり知っていないものをやっていると思います。おそらくModalPopupExtenderにも同じことが起こります。

誰かが助けてくれることを願っています!