file path
-
hello, i have an XML file which is located in the root dir of my project. i want to read it via a regular class ( not connected to a web page. i use it as a singleton for various services) when i put only the file name , i get c:\windows\system32\filename.xml how can i retreive the current dir of the website? tnx, avi
-
hello, i have an XML file which is located in the root dir of my project. i want to read it via a regular class ( not connected to a web page. i use it as a singleton for various services) when i put only the file name , i get c:\windows\system32\filename.xml how can i retreive the current dir of the website? tnx, avi
Server.MapPath(YourFile)
?Navaneeth How to use google | Ask smart questions
-
Server.MapPath(YourFile)
?Navaneeth How to use google | Ask smart questions
-
hello, i have an XML file which is located in the root dir of my project. i want to read it via a regular class ( not connected to a web page. i use it as a singleton for various services) when i put only the file name , i get c:\windows\system32\filename.xml how can i retreive the current dir of the website? tnx, avi
-
ok , it works. what if i have more than one file with same name at my project? what will the value be ?
-
i see, so it looks on the current path i am in and not also in its subs ok , thanks
modified on Tuesday, April 28, 2009 6:35 AM
-
hello, i have an XML file which is located in the root dir of my project. i want to read it via a regular class ( not connected to a web page. i use it as a singleton for various services) when i put only the file name , i get c:\windows\system32\filename.xml how can i retreive the current dir of the website? tnx, avi
You can use Server.MapPath(.) to retrive current directory of you website.