Last post Nov 08, 2005 04:03 PM by Caddre
Nov 06, 2005 02:02 AM|samiei|LINK
How may I generate a text file with dynamic contents and send it to the client, at ASP.NET. For example, I desire each user may receive a text file containing the current date and time or the client IP address.
As a solution, I created a Web Form and erased the whole contents. Then wrote the code such as:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Response.ContentType = "Text"
While loading the page, user would receive a text file containing the current date and time. But in this way, I cannot change the file name. The file would be downloaded to client as the Web Form name (e.g. "File.aspx").
Much obliged to you for your great attention.
Nov 08, 2005 04:03 PM|Caddre|LINK
Try these links the first link covers what you are looking for and there are more related tutorials in the second link. Hope this helps.