Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Codes not generate the file properly

$
0
0
Hi,
I don't know why these codes below are not creating any .xml file when I run the project.
                    string FILENAME = Server.MapPath("~") + "..\\..\\xml\\common.xml";
                    ?XmlTextWriter textwrt = new XmlTextWriter(FILENAME, null);
                    textwrt.WriteStartDocument();
                    textwrt.WriteStartElement("Common");
                    textwrt.WriteAttributeString("field1", tb_fld1.Text);
                    textwrt.WriteAttributeString("field2", tb_fld2.Text);
                    textwrt.WriteEndElement();
                    textwrt.Close();

Many Thanks & Best Regards, Hua Min


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>