CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/30/2006 9:34:06 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 19 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
Skydiver
Asp.Net User
masterpages, folders and images1/30/2006 9:34:06 PM

0/0

I'm having an issue with a page that is within a folder (i.e folder/page.aspx) that is the content page of a masterfile (masters/masterfile.master).

The masterpage has srcs to the images as follows: img src="images/pic1.gif"

When I try to load the page (folder/page.aspx) the images do not appear correctly and right clicking on them they show the following path: localhost blah blah blah/MyApp/folder/images/pic1.gif.  From this it's obvious that seeing the page was created inside a folder (1 level deeper than the root), it assumes that the image folder is right there too.

How can I use the masterfile and still keep the association to the images folder that's in the root directory regardless of what folder or how deep in the heirarchy I might be in?

Thanks!

Skydiver.

orzeh
Asp.Net User
Re: masterpages, folders and images1/31/2006 8:41:45 AM

0/0

hi!

use Image control and set ImageUrl property to absolute path, i.e.

<asp:Image ID="Image1" runat="server" ImageUrl="~/images/imag1.jpg" />

ASP will take care to set correct path in img tag

orzeh


code less, think more!
Skydiver
Asp.Net User
Re: masterpages, folders and images2/1/2006 3:52:30 PM

0/0

I was just gonna write you back and tell you that it wasn't working, but then I noticed that you were using the imagecontrol, not just an HTML element....  Works great, thanks.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Everyday Apps For Dummies Authors: Doug Lowe, Pages: 504, Published: 2006
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
ASP.NET 2.0: A Developer's Notebook Authors: Wei Meng Lee, Pages: 326, Published: 2005
Microsoft Office SharePoint Server 2007: The Complete Reference Authors: David Matthew Sterling, David Sterling, Pages: 788, Published: 2007
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
Beginning VB 2008 Databases: From Novice to Professional Authors: Vidya Vrat Agarwal, James Huddleston, Pages: 409, Published: 2008
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1148, Published: 2006

Web:
Absolute Image Locations and Master Pages | Tech Off | Channel 9 Nov 30, 2006 ... My master page uses HTML that includes bith tags and Java Script that manipulates the images in the /Images folder. ...
URLs in Master Pages : The Official Microsoft ASP.NET Site For example, our website has an ~/Images/ folder with a single image file, PoweredByASPNET.gif . The master page file Site.master has an element in ...
Technical Tips & Tricks: Creating a Custom SharePoint MasterPage ... Aug 12, 2008 ... Add the masterpage you want in the masterpage folder, the CSS file into the styles folder, and all images you need into the images folder. ...
Master Page background image only visible from pages in root directory inside aspx folder (or others) you put all your content pages and the master page, and for all images all you need to do is: ...
p2p.wrox.com Forums - Problem with Images in the MasterPage when .... I have a problem with Images in the MasterPage(which is in the root .... Images/ SomeImage to refer to an image that's inside the Images folder at the same ...
Masterpage using images inside an image folder does not display in ... I have a masterpage that uses an image as a background. The image is inside an “ Images” folder. Here is the code in the masterpage ...
master pages question - ASPnix Web Hosting - Forums I create a folder which only members will have access. I create a .aspx file inside the folder and inherit the master page and all my images go whack. ...
Deploy Master Page Feature the folders for images/styles under the MasterPages are copies of the IMages & Styles folders) Feature.XML: http://sharepoint.s3.amazonaws.com/featurexml. ...
Feedback: Master Pages not displaying properly in browser when ... The solution there would be in the master page to change the image tags to have a ... This works on my home page but not in the pages held in folders as ...
ASPX: Master Pages Feb 25, 2008 ... If your master page is not in the root folder, it makes good sense to place your master dependant images in a image folder under the folder ...




Search This Site:










user.identity.isauthenticated doesn't work in master page

stopping page flicker

master page mystery event solution

treeview nodes not based on roles

capturing form parameters in content pages

dropdownlist not working in masterpage

help with mouse over

treeview: different url for node or image click-possible?

how to add to the contents area during runtime

contentplaceholder and control's id

last page access using asp.net similar to history.back(-1)

menus that expand on click

localization in skin files

how do i find master id for a page element in the asp:content page

using multiple master pages?

site map depth and current position within the site map

need to limit menu items by login

trying to publish website - getting master page errors

system.configuration.provider.providerexception: this property cannot be set for anonymous users

menu fixed at the top when scrolling down?

wizard (webform) writes twice to database.

theme applied, every control not working!!!help!!!

i want to use two menus

wizard control and validationgroup property

voice of asp net 2.0 menu completely clickable

masterpage caching problem

it work on regular webpage but not webpage with masterpage...

treeview and manual databinding

how to edit in treeview itself

menu control loses formatting in masterpage

  Privacy | Contact Us
All Times Are GMT