Solved

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

Posted on 2015-01-07
2
159 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 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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