Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 9th, 2008, 02:51 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
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?
  #2 (permalink)  
Old May 11th, 2008, 06:06 PM
Registered User
 
Join Date: May 2008
Location: , , New Zealand.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Cheers,
Brian.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.