hey from my previous question..
ive managed to finally get it all working...
if i click submit.. a file is then created in xml format but if i enter new data it will overwrite the same file how do i 开发者_Go百科stop this..
this is the code i am using
Protected Sub btnWriteXML_onClick(ByVal sender As Object, ByVal e As System.EventArgs)
Try
Dim enc As Encoding
Dim objXMLTW As New XmlTextWriter(Server.MapPath("contact.xml"), enc)
objXMLTW.WriteStartDocument()
objXMLTW.WriteStartElement("Feedback Form")
how do i stop this from overwriting?
You would need to make the filename unique. Perhaps adding a timestamp or a guid or writing logic to add a sequential number onto the filename?
精彩评论