Welcome to WebmasterWorld Guest from 50.19.190.144

Forum Moderators: ocean10000

Message Too Old, No Replies

Server.MapPath problem

Cannot get the location of an XML file from codebehind

     
6:00 pm on May 6, 2006 (gmt 0)

New User

10+ Year Member

joined:Aug 12, 2005
posts:27
votes: 0


Hi guys,

I am trying to read an XML file that is located in the same folder as my ASPX and codebehind file...

When I tried it this way (Going to the root and coming back to my folder where the file is located;

uc.LoadFile(Server.MapPath("/test/samplefile.xml"));

It doesn't work...

When I tried it like this;

uc.LoadFile("samplefile.xml");

It still doesn't work... This code used to work. I know it's about not being in the correct folder because I used to be able to make this work. The LoadFile function is working properly and everything else... It does accept strings...

If someone can give me some advice, I would really appreciate it...

10:49 am on May 7, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 27, 2003
posts:637
votes: 0


Do you receive an error? Or does the page just refresh and not show anything?