简体   繁体   English

ASPX页面未呈现任何内容

[英]ASPX page not rendering anything

This page isn't rendering at all; 此页面根本不呈现; It's just blank. 它只是空白。 I can't figure it out. 我不知道。 I can't find any html errors. 我找不到任何html错误。

<%@Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="EmailListManagement.aspx.cs" Inherits="Anzalone.Symba.Admin.EmailListManagement" MasterPageFile="~/Symba/MasterPages/Admin.Master" %>

<asp:Content ContentPlaceHolderID="cphMain" runat="server">
 <div style="margin-left: auto; margin-right: auto; width: 700px;">
    <h1>Email List Management</h1>
    <div>
        Select Email List: 
    <asp:DropDownList ID="ddlSelectEmailList" runat="server">
    </asp:DropDownList>
    <br />
    <asp:Button ID="btnComposeEmailView" runat="server" Text="Compose Email" 
        onclick="btnComposeEmailView_Click" /> <asp:Button ID="btnManageListView" 
        runat="server" Text="Manage List" onclick="btnManageListView_Click" />
</div>
<div>
    <asp:MultiView ID="mvEmailListManagement" runat="server" ActiveViewIndex="0">
        <asp:View ID="viewEmpty" runat="server">             
        </asp:View>
        <asp:View ID="viewComposeEmail" runat="server">
        <div style="margin-left: auto; margin-right: auto; width: 700px;">
            <div style="padding-left: 250px; font-size: large; font-weight: bold;">Compose Email</div>
            Subject:&nbsp;<asp:TextBox ID="txtSubject" runat="server" Width="625px"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtEmailMessage" runat="server" TextMode="MultiLine" Rows="20" Width="600"></asp:TextBox>
            <br />
            <div style="margin-left: 250px;">
                <asp:Label CssClass="NotificationMessage" ID="lblEmailMessage" runat="server" Visible="false"></asp:Label>
                <br />
                <asp:Button ID="btnSendEmail" runat="server" Text="Send" 
                    onclick="btnSendEmail_Click" /> <asp:Button ID="btnCancelEmail" 
                    runat="server" Text="Cancel" onclick="btnCancelEmail_Click" />
            </div>
        </div>
        </asp:View>
        <asp:View ID="viewManageList" runat="server">
        <div class="WidgetEditor">
               <div class="row">
                <span class="label">
                  Mailing List Name:
                </span>
                <span class="formw">
                 <asp:TextBox ID="txtMailingListName" runat="server"></asp:TextBox>
                </span>
               </div>
               <div class="row">
                <span class="label">
                  Smtp Server:
                </span>
                <span class="formw">
                  <asp:TextBox ID="txtSmtpServer" runat="server"></asp:TextBox>
                </span>
               </div>
               <div class="row">
                <span class="label">
                    Port:
                </span>
                <span class="formw">
                    <asp:TextBox ID="txtPort" runat="server"></asp:TextBox>
                </span>
               </div>
               <div class="row">
                <span class="label">
                   User Name:
                </span>
                <span class="formw">
                   <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
                </span>
               </div>
               <div class="row">
                <span class="label">
                   Password:
                </span>
                <span class="formw">
                   <asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
                </span>
               </div>
               <div class="row">
                <span class="label">
                   Email From:
                </span>
                <span class="formw">
                   <asp:TextBox ID="txtEmailFrom" runat="server"></asp:TextBox>
                </span>
               </div>     
              <div class="row" style="text-align: center;">
                <asp:Label CssClass="NotificationMessage" ID="lblMailingListUpdate" runat="server" Visible="false"></asp:Label>
              </div>
              <div class="row">
                <span class="label"><asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSaveMailingListProperties_Click" /> </span>  
                <span class="formw"><asp:Button ID="btnCancel" runat="server" Text="Cancel" onclick="btnCancelManageList_Click"/></span>
              </div>  
        </div>
        <div>
            <asp:GridView ID="gvRecipients" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false"
                OnRowCommand="gvRecipients_OnRowCommand" DataKeyNames="ID">
                <Columns>                      
                    <asp:BoundField DataField="EmailAddress" HeaderText="Email Address" SortExpression="EmailAddress" />
                    <asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="UserLastName" />
                    <asp:BoundField DataField="FirstName" HeaderText="First Name" SortExpression="UserFirstName" />                                      
                    <asp:CommandField InsertImageUrl="~/Symba/Images/icoAdd.gif" ShowInsertButton="true"
                        DeleteImageUrl="~/Symba/Images/icoDelete.png" ShowDeleteButton="true" />                     
                </Columns>
             </asp:GridView>
         </div>
        </asp:View>
    </asp:MultiView>
</div>
</div>
</asp:Content>

Any ideas? 有任何想法吗?

View Source renders: 查看源渲染:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>

Here is the masterpage: 这是母版页:

  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Admin.master.cs" Inherits="Anzalone.Symba.MasterPages.Admin" %>

<!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>Admin</title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>

<link href="../Styles/CSS/Symba.css" rel="stylesheet" type="text/css" />    

<script type="text/javascript" src="../../tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="../Scripts/SymbaScripts.js"></script>

<script type="text/javascript">
    tinyMCE.init({
        // General options
        mode: "textareas",
        theme: "advanced",
        plugins: "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

        // Theme options
        theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
        theme_advanced_toolbar_location: "top",
        theme_advanced_toolbar_align: "left",
        theme_advanced_statusbar_location: "bottom",
        theme_advanced_resizing: true,
        relative_urls: false,
        editor_deselector: "mceNoEditor",


        // Example content CSS (should be your site CSS)
        // using false to ensure that the default browser settings are used for best Accessibility
        // ACCESSIBILITY SETTINGS           
        // Use browser preferred colors for dialogs.
        browser_preferred_colors: true,
        detect_highcontrast: true,

        // Drop lists for link/image/media/template dialogs
        template_external_list_url: "lists/template_list.js",
        external_link_list_url: "lists/link_list.js",
        external_image_list_url: "lists/image_list.js",
        media_external_list_url: "lists/media_list.js",

        // Style formats
        style_formats: [
        { title: 'Bold text', inline: 'b' },
        { title: 'Red text', inline: 'span', styles: { color: '#ff0000'} },
        { title: 'Red header', block: 'h1', styles: { color: '#ff0000'} },
        { title: 'Example 1', inline: 'span', classes: 'example1' },
        { title: 'Example 2', inline: 'span', classes: 'example2' },
        { title: 'Table styles' },
        { title: 'Table row 1', selector: 'tr', classes: 'tablerow1' }
    ],

        // Replace values for the template plugin
        template_replace_values: {
            username: "Some User",
            staffid: "991234"
        },
        valid_elements: "*[*]",
        extended_valid_elements: "*[*]"
    });
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
    <asp:ContentPlaceHolder ID="cphMain" runat="server">

    </asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

Also it showed up in the Visual Studio design view. 它还显示在Visual Studio设计视图中。

I doubt it will have anything to do with the HTML you have there. 我怀疑这与您那里的HTML有什么关系。 To diagnose it, create a brand new page with just the bear essentials. 要对其进行诊断,请创建一个仅包含熊市必需品的全新页面。 For example, leave in the master page, but remove Inherits and all the other guff. 例如,保留在母版页中,但删除Inherits和所有其他guff。 Try the following; 尝试以下方法;

<%@Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="MyNewPage.aspx.cs" MasterPageFile="~/Symba/MasterPages/Admin.Master" %>

<asp:Content ID="Content4" ContentPlaceHolderID="head" runat="server">
<%-- Something in the head  --%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
bah
</asp:Content>

As an additional help, put breakpoints in the codebehind of the page and the masterpage to see if it is getting loaded. 作为附加帮助,将断点放在页面和母版页的代码后面,以查看是否正在加载它。

Once that is working, re-add your content listed above to determine what is causing the issue. 一旦可行,请重新添加上面列出的内容以确定是什么原因导致了问题。 It is possibly something in the codebehind of the page. 它可能是页面代码背后的东西。

Double check the link to the masterpage file : 仔细检查母版文件的链接:


MasterPageFile="~/Symba/MasterPages/Admin.Master"

And then the name of the Content element : cphMain 然后是Content元素的名称:cphMain

Have you selected this page as the startup page. 您是否已选择此页面作为启动页面。 Otherwise check the master page are the ContentPlaceHolderID="cphMain" matching. 否则,检查母版页是否与ContentPlaceHolderID="cphMain"匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM