473,771 Members | 2,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File path and Master page problem

In the MasterPage an images is mapped as follows: ../Images/XYZ.gif and that
works fine as long as the forms using this master file are related to the
image file in the same way

But I have another sub folder where I have more forms using the Master Page
and there the image is not found so I tried to change the path to:
~/Images/XYZ.gif and then nothing works

Thank you,
Samuel
Oct 17 '06 #1
2 1936
Master pages do not automagically call to resolve the client side URL on
standard images, so you end up with relative pathing with a tilde (~)
inserted. To overcome this, use an image control instead; you can then use
the tilde for virtual directory root.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** *************** ****
Think outside of the box!
*************** *************** *************** ****
"Samuel Shulman" <sa************ @ntlworld.comwr ote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
In the MasterPage an images is mapped as follows: ../Images/XYZ.gif and
that works fine as long as the forms using this master file are related to
the image file in the same way

But I have another sub folder where I have more forms using the Master
Page and there the image is not found so I tried to change the path to:
~/Images/XYZ.gif and then nothing works

Thank you,
Samuel

Oct 17 '06 #2
Thanks for your response,

I want to use th mage as a background
"Cowboy (Gregory A. Beamer)" <No************ @comcast.netNoS pamMwrote in
message news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Master pages do not automagically call to resolve the client side URL on
standard images, so you end up with relative pathing with a tilde (~)
inserted. To overcome this, use an image control instead; you can then use
the tilde for virtual directory root.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** *************** ****
Think outside of the box!
*************** *************** *************** ****
"Samuel Shulman" <sa************ @ntlworld.comwr ote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>In the MasterPage an images is mapped as follows: ../Images/XYZ.gif and
that works fine as long as the forms using this master file are related
to the image file in the same way

But I have another sub folder where I have more forms using the Master
Page and there the image is not found so I tried to change the path to:
~/Images/XYZ.gif and then nothing works

Thank you,
Samuel


Oct 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2282
by: Mark Olbert | last post by:
I have some img tags on a master page which reference files in a top-level directory. They look like this: <img src="assets/test.gif" id="gnr" /> assets is a subdirectory of the website root. My problem is this: this kind of path reference in a master page won't work when the page using the master is not in the root folder: root_page.aspx <- if this uses the master, the image file will be located and displayed correctly
6
2864
by: Naveen K Kohli | last post by:
I have couple of javascript files that need to be referenced for each content page. So I am trying to put them on Master page. The problem is that content pages are not on one level of the site. I have been trying to find a way to specify path to these JS files so that the actual path to these files correctly gets applied on the path at every level of the folder hierarchies. So far no luck... <script languaage=javascript...
1
1755
by: thejackofall | last post by:
I can use a good help here with what looks like a simple problem. I have a control called Header.ascx in /Control/System directory, where / is my web application directory. The header is used in a master page called MasterPage.master in the / directory. I have a Default.aspx in / which uses the master page in the root. The user control (which is really in the master page) in this page shows fine.
7
3190
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file" name="file_1" size=46 /><input type=submit /> so, after adding a few files, the input fields look like this:
5
12227
by: Joey | last post by:
I have the following in the head section of the ASPX page for my master page: <script language="javascript" type="text/javascript" src="MyCodeFile.js"></script> This includes my external javascript code file for my master page and all subscribing pages. But I ran into a problem. This only works for pages in the root directory of the site. The (relative) path is wrong for pages in other folders on the website.
0
1680
by: KingKong07 | last post by:
Hi! I have a problem with publishing my solution. I use “Use fixed naming and single page assemblies” to publish. So I just can update one and one file, this works fine, but today I had to update my master.page My master page is called “FrontPageMaster.master”. I have only changed some html in the master page and not done anything with the master.cs When I’m in the bin folder and update the file:
0
2023
by: Steve | last post by:
Hello- Your assistance with this issue is greatly appreciated. Environment: - Load-balanced IIS 6.0 servers (Win2003) - web servers point (via UNC path) to a Microsoft File Cluster on different machines. - domain ASPNET account that handles the function/permissions of the (traditionally) local machine ASP.NET account.
3
4433
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine when iam using a normal web page... but can't in content page.... Code in Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="submaster.master.cs" Inherits="submaster" %> <%@ Register Assembly="AjaxControlToolkit"...
2
1533
by: hiranmaie | last post by:
I am having the problem with the image path. I am using a master page and the reference to the image in web content page which is not working properly. It shows Done, with errors on page error. If I take a web page outside the master page it works fine. The path without master page will be like "aspx_Pages/img.jpg" whereas it takes the path as "../aspx_pages/img.jpg if the master page is considered. What could be the reason and please tell me...
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9911
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.