Not Getting perfect path

  • Thread starter Thread starter Hitesh Panchal
  • Start date Start date
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.
 
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
 
Back
Top