[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

I added a new web form page but it doesn't display the header and footer images

Posted on 2015-01-07
2
Medium Priority
?
175 Views
Last Modified: 2015-01-12
Hi, I'm using VS2012.
I added the new page by right click the project, add new item, select web form.  It didn't ask me if I want master page so I edit the <%@ Page ................  Mannually to add in the masterpagefile.  it's using the site.master but it can't find the images for the header and the footer.  
This new page is placed on the same level as the default.aspx which displays the header and footer perfectly.  How can I fix this?  Thank you.
0
Comment
Question by:lapucca
2 Comments
 
LVL 9

Expert Comment

by:sudheeshthegreat
ID: 40537274
Can you share the Page directive that you have in place now for your new page?
<%@ Page... ?
0
 
LVL 18

Accepted Solution

by:
Jerry Miller earned 2000 total points
ID: 40537808
I am not sure how you are referencing your images, but my pages are set up in this manner. All of your header controls  / images are placed on the Master Page above the ContentPlaceHolder, the footer controls  / images below it

On the Master Page, you should have a ContentPlaceHolder object similar to this:
<div id="divMain" runat="server" style="width:82%; float:none; text-align:left; margin-left:15%" >
		<asp:ContentPlaceHolder id="Main" runat="server">
        <%--Main Content comes from the other pages dependent upon which link is chosen
        and the roles / rights involved for that user--%></asp:ContentPlaceHolder>
 </div>

Open in new window


On the child page, it's referenced like this:
<asp:Content ID="MainContent" ContentPlaceHolderID="Main" Runat="Server">
<%--Page code goes here--%>
</asp:Content>

Open in new window


If you can share your code on both the master and child, post it and someone will help you get it ironed out. Just make sure you change anything proprietary information before posting.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month18 days, 4 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question