Wrox Programmer Forums
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 9th, 2008, 02:51 PM
Authorized User
Join Date: Apr 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Images from Master pages not displaying in Admin

I created the Admin folder within the project and created other pages within it (for example Default.aspx). The Admin folder has security set within web.config to only allow Admin. However, when Admin/Default.aspx is displayed in the browser all the images that are part of my .master page file are not displayed.

That doesn't make sense since the master page has a content placeholder in it for the content to display. Any thoughts? Seems like a simple issue?
Old May 11th, 2008, 06:06 PM
Registered User
Join Date: May 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

I had a similar problem. I am guessing that you have used standard html img tags for your images. This is fine in the master page or pages at the same level of the master page, but as soon as you start adding pages in subfolders the url to the image in the new page is not correct. To fix this I used asp:Img control instead and it is able to resolve the url relative to the root folder as long as it is set to runat="server" and ImageUrl property has the prefix of "~/" followed by the image location eg "~/images/my_image.jpg". I am a newbie at all this, and I may have got this wrong, but that's what worked for me.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Pages Jayahar ASP.NET 3.5 Basics 1 September 2nd, 2008 04:20 PM
Master Pages, Content Pages and CSS carliviris Visual Studio 2005 0 January 8th, 2008 05:56 PM
Master pages wunnavabk ASP.NET 2.0 Professional 1 June 25th, 2007 07:09 AM
How to hide admin pages from search? MTLedari ASP.NET 2.0 Professional 13 May 18th, 2007 01:56 AM
Displaying options specific to the admin Smack715 Classic ASP Basics 11 June 23rd, 2004 08:33 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.