Solved

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

Posted on 2015-01-07
2
170 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

690 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