Welcome to WebmasterWorld Guest from 54.159.165.175

Forum Moderators: ocean10000

Server.MapPath problem

Cannot get the location of an XML file from codebehind

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

5+ Year Member



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)

10+ Year Member



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

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month