Not Getting perfect path

H

Hitesh Panchal

Hi,

I have a ASP.NET application. IN which i have included one xml file. Now to
getting values from that XML file if I am going through Load Method of
XMLDOC it is fetching file from "C:\WINDOWS\SYSTEM32". I want to set in such
a way that it can fetch my XML file.

How can i set the path of my application directory.
 
M

Mohamed El Ashmawy

Please use the server.mapath method. For example
string XMLFilePath = Server.MapPath("Sample.xml")
would return you the full path of the Sample.xml file that is present in
your ASP.Net application

Regards
Mohamed El Ashmawy
MEA Developer Support Center
ITWorx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top