D
David Berman
Hello,
I'm having a problem using MapPath. The problem is that my
production site is www.mydomain.com, but my development site is
www.devdomain.com/myproject. In the root folder I have a base class
page, in a folder called /learn I have a page that uses my base class.
The baseclass opens a file and writes the output to the browser. It
finds the file using MapPath("/templates/header.htm"). This works fine
on the production server, however it doesn't work on the development
machine because the initial / gets interpreted as "start from the root".
If I don't put the first /, then it doesn't work either because the base
class calls mappath which maps to "/learn/templates/header.htm" which
isn't where the file is.
How can I manage this so that it works using relative paths, so I can
develop on my development machine and then publish to my production
machine?
Thank you!
David
Meet people for friendship, contacts,
or romance using free instant messaging software! See a picture you
like? Click once for a private conversation with that person!
www.SocialNetwork.com - Get free software!
I'm having a problem using MapPath. The problem is that my
production site is www.mydomain.com, but my development site is
www.devdomain.com/myproject. In the root folder I have a base class
page, in a folder called /learn I have a page that uses my base class.
The baseclass opens a file and writes the output to the browser. It
finds the file using MapPath("/templates/header.htm"). This works fine
on the production server, however it doesn't work on the development
machine because the initial / gets interpreted as "start from the root".
If I don't put the first /, then it doesn't work either because the base
class calls mappath which maps to "/learn/templates/header.htm" which
isn't where the file is.
How can I manage this so that it works using relative paths, so I can
develop on my development machine and then publish to my production
machine?
Thank you!
David
Meet people for friendship, contacts,
or romance using free instant messaging software! See a picture you
like? Click once for a private conversation with that person!
www.SocialNetwork.com - Get free software!