My ideas

Tuesday, November 21, 2006

How to save dynamic information on user client computer

Keywords: How to save dynamic information on user client computer, How to save a file that has not been created on user computer, how to save a file in memory on user computer

1. Convert the data in the file that you want to write into String

2. Then do as below

'here str is a string

Dim str As String = "THIS IS AN XML FILE"
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename=ad.xml")
Response.Write(str)
Response.End()