Last post Jun 14, 2012 07:37 AM by GeorgeTheOne
Jun 14, 2012 05:24 AM|GeorgeTheOne|LINK
Hi ! I am able to create an xml file using XmlWriter xwrite = XmlWriter.Create("F:\\dEEVOiR\\matrix\\Text1.xml");
But the problem is that I have to specify the entire path. This may lead to problems when my website is hosted.
So I want to create it in the matrix folder directly or in the same folder where my .aspx files exist.
Is there a way out? Please help. Thanks!
Jun 14, 2012 05:31 AM|tinmgaye|LINK
try this way
String AppDirPath = MapPath("~/");
Refer to this;
Jun 14, 2012 05:34 AM|Muhammad Fakhr Elden Sami|LINK
you can use Server.MapPath to write within your web application as follows
Hope it helps
Jun 14, 2012 05:35 AM|Mudasir.Khan|LINK
creating a file need wrtie permission its recommended that do it in a seperate folder where no aspx or config files are there
to be more secured
Jun 14, 2012 07:14 AM|GeorgeTheOne|LINK
Please give some more solutions
Jun 14, 2012 07:37 AM|GeorgeTheOne|LINK
Finally tried using XmlWriter xwrite = XmlWriter.Create(Server.MapPath("Text4.xml"));
Thanks so much all of you!