473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

page.MaphPath problem

I have a userControl placed in a directory like this:

/usercontrols/myUserControl.ascx
/usercontrols/controlsList.txt
/index.aspx

'index.aspx' is using 'myUserControl.ascx'
'myUserControl.ascx' is using page.MapPath("controlsList.txt") to open
the file, and the process is failing because the file cannot be found.
the system is looking for:

\\webshare\controlsList.txt
instead of
\\webshare\usercontrols\controlsList.txt

is this how microsoft designed this to be? i know i can change the
folder to match, but i want to make sure that there isn't any other
programed way...
Nov 18 '05 #1
1 938
this is as expected. It's all relative to the PAGE that has the controls.
Make all calls relative to the root and you are ok, or what I do is
something like this

root
root/pages/
root/controls/
root/.......blah/

Then I make ALL my calls/paths like this

.../pages/pageName.aspx
or
.../controls/controlName.ascx
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Tascien" <ta******@ecoaches.com> wrote in message
news:80*************************@posting.google.co m...
I have a userControl placed in a directory like this:

/usercontrols/myUserControl.ascx
/usercontrols/controlsList.txt
/index.aspx

'index.aspx' is using 'myUserControl.ascx'
'myUserControl.ascx' is using page.MapPath("controlsList.txt") to open
the file, and the process is failing because the file cannot be found.
the system is looking for:

\\webshare\controlsList.txt
instead of
\\webshare\usercontrols\controlsList.txt

is this how microsoft designed this to be? i know i can change the
folder to match, but i want to make sure that there isn't any other
programed way...

Nov 18 '05 #2

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

Similar topics

8
by: Raphael Gluck | last post by:
Hi Everyone I am having some problems with a master detail page i have set up to catalogue brochures from my site. On my master page www.tripakltd.com/brochures.asp users are invited to select...
6
by: Ed | last post by:
I first noticed this in my own app. Images would show up missing randomly on IE 6.0.2800.1106 on Windows 2000 server. I then was able to repro this problem on Microsoft's website!!! The page I...
7
by: Aaron Prohaska | last post by:
I have just run into a problem where I have a page that posts back to itself to execute code, except when the page does the post back it somehow executes code that is in our home page for the site....
7
by: Brian Paul | last post by:
When a user clicks on a linkbutton on a page, i would like to render a printer-friendly version of the asp.net page and download it as an html attachment to the browser. The code below works great,...
3
by: Vince Mele | last post by:
We are having a small problem with a couple of reports we developed for a client website. On two of the reports, sometimes (most of the time) we receive a warning message before the output of...
1
by: Lenard Gunda | last post by:
Hi! I have the following problem. From my main page, when someone clicks a button, it uses client side javascript to open another .aspx page. This page displays content, based on what the...
1
by: Daniel Alvarez | last post by:
Hello. First of all, I'm working in an ASP.NET 1.1 project, which has a large page (due to client requirements, a huge page is needed to process the information, and it has a lot of interactivity...
5
by: henryrhenryr | last post by:
Appologies for unclear title. I don't really understand the problem I'm facing. My system: PHP 5.2.1, Win2K, Apache 2, MySQL 5 (local - problem is same on my live site running php 4.3.9, Linux,...
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.