Solved

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

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now