locked
add a new page to a precompiled site RRS feed

  • Question

  • User-149452155 posted

    Sorry if there an answer for this problem, i'm brand new in this forums,

    I'm working in a precompiled site, in the website exist diferents master pages, i want to create a new page in this site, in the tag page 

    <%@ Page Language="C#" MasterPageFile="~/Master/Bootstrap/Report.master" AutoEventWireup="false" %>

    i declared the master page file pointing to repor.master but when i run the website it return an error because don't recognize the contents inside report.master it tried to run the home.master 

    Report.Master work perfectly in others pages in the website, only in the new page give me that problem, How I see in the error it is calling home.master but i want to call report.master

    add jpg of the error

    error

    Thursday, December 26, 2019 5:37 PM

All replies

  • User665608656 posted

    Hi fernandez,

    According to your link, we can not see the error message you provided.

    To upload an image, I suggest that you go to any post on stackoverflow, find the comment area below, select the image you need to upload, and then copy the generated url to display on the forum.

    You can use this link for image upload:  https://stackoverflow.com/questions/56055486/boto3-sqs-get-queue-url-results-in-queuedoesnotexist

    Here is the detailed operation of uploading pictures, you can refer to it:

    Best Regards,

    YongQing.

    Friday, December 27, 2019 2:28 AM
  • User-149452155 posted

    Thks very much

    Friday, December 27, 2019 2:58 AM
  • User665608656 posted

    Hi fernandez,

    Please check if the page you are currently running is a reference to report.master or home.master.

    And please confirm if there is a page referencing home.master in your current project?

    Please provide us with the code of the report.master page and the page that references the master page.

    And hope you can copy the error message to us or translate it into English for our reference.

    Best Regards,

    YongQing.

    Friday, December 27, 2019 5:50 AM
  • User-149452155 posted

    this is the tag in the new page that references report.master 

    <%@ Page Language="C#" MasterPageFile="~/Master/Bootstrap/Report.master" AutoEventWireup="false" %>

    This is the error:    Cannot find 'PageTitle' of ContentPlaceHolder on the master page '/Master/Bootstrap/Home.master', check the ContentPlaceHolderID attribute of the content control on the content page.

    I think that the precompiled site is trying to take home.master as the default master for the new page ignoring atribute MasterPageFile

    this report.master is used by others pages in the website an this is the code

    <%@ Master Language="C#" AutoEventWireup="True" Inherits="Master_Bootstrap_Report" CodeBehind="Report.master.cs" %>
    
    <%@ Register TagPrefix="Crl" TagName="Botones" Src="~/Controls/Bootstrap/MenuButton.ascx" %>
    <%@ Register TagPrefix="Crl" TagName="Header" Src="~/Controls/Bootstrap/Header.ascx" %>
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <!-- Google Tag Manager -->
        <script>(function (w, d, s, l, i) {
                w[l] = w[l] || []; w[l].push({
                    'gtm.start':
                        new Date().getTime(), event: 'gtm.js'
                }); var f = d.getElementsByTagName(s)[0],
                    j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
                        'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
            })(window, document, 'script', 'dataLayer', 'GTM-KH88FJT');</script>
        <!-- End Google Tag Manager -->
    
        <title>Nombre Sitio</title>
        <asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
        <link rel="icon" type="image/ico" href="/images/favicon.png" />
        <script type="text/javascript" src="/App_Themes/Bootstrap/js/menuspand.js?V=123"></script>
        <script type="text/javascript">
            function PrintData() {
                window.print();
            }
        </script>
        <link href="/Content/bootstrap.css" type="text/css" rel="stylesheet" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
        <link href="/Content/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" />
    
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    
        <script type="text/javascript" src="/Scripts/MovesLineSite.js"></script>
        <script src="/Scripts/bootstrap.min.js"></script>
        <script src="/Scripts/moment.min.js"></script>
        <script src="/Scripts/bootstrap-datetimepicker.min.js"></script>
    
        <link href="/Content/non-responsive.css" type="text/css" rel="stylesheet" />
    
    </head>
    <body class="master-report">
    
        <!-- -->
        <!-- Google Tag Manager (noscript) -->
        <noscript>
            <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KH88FJT"
                height="0" width="0" style="display: none; visibility: hidden"></iframe>
        </noscript>
        <!-- End Google Tag Manager (noscript) -->
        <!-- -->
    
        <!-- Header -->
        <div class="header-row">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-xs-3">
                        <asp:HyperLink runat="server" ID="headerLinkLogo" Target="_top" NavigateUrl="~/Report/Welcome.aspx"><img src="/images/logo.png" alt="Logo" /></asp:HyperLink>
                    </div>
                    <div class="col-xs-6">
                        <div class="contact-box">
                            <div class="contact-info contact-info-sm">
                                <strong>Questions?</strong><br />
                                Call us toll free at <em></em>,<br />
                                or send us an email to: <a href="ccccc@ccc.com">uu@uuu.com</a>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-3">
                        <div class="agent-links">
                            <Crl:Header ID="HeaderControl" runat="server" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Navigation -->
        <Crl:Botones runat="server" ID="CrlBotones" />
        <asp:ContentPlaceHolder ID="PageTitle" runat="server"></asp:ContentPlaceHolder>
        <asp:ContentPlaceHolder ID="Toolbar" runat="server"></asp:ContentPlaceHolder>
        <!-- Content -->
        <div class="content-row">
            <div class="container-fluid container-report">
                <div class="row">
                    <div class="col-xs-12">
                        <form id="form1" runat="server">
                            <asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    
        <!-- Footer -->
        <div class="footer-row">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="copyright">
                            <p><i>All Rights Reserved <%= DateTime.Today.ToString("yyyy") %> &copy;</i></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    
        <asp:ContentPlaceHolder ID="BottomScripts" runat="server"></asp:ContentPlaceHolder>
    </body>
    </html>

    ```

    Friday, December 27, 2019 11:19 AM
  • User665608656 posted

    Hi fernandez,

    According to your description, are you currently using a website project?

    I suggest you can try to open the following path, delete all files in the root folder, and run again:

    32bit OS: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\
    64bit OS: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\

    Best Regards,

    YongQing.

    Monday, December 30, 2019 7:24 AM