... wish all of you are having a nice Valentine's Day .. For me, I am stack at work finishing my program.
I have a piece of code to write an xml file.
Dim ds As New DataSet
Dim dt As DataTable = GetDtable()
ds.Tables.Add(dt)
Dim filename As String = Server.MapPath("XmlDoc.xml")
Dim writer As New System.IO.StringWriter
dt.WriteXml(filename, True)
That work will write an XML file whatever I put in the datatable (or dataset). It is just a simple code and it works fine.
The problem is it will replace the old file everytime the new file is created. I really don't want that to happen.
I also want to include 2 variables (username, sessionID) also time of the file created in the file name.
So file name will be Username_sessionID_time.xml rathen than a fixed name.
Can anyone tell me how can i do that ?
thanksssssssss so much.