Response.AddHeader

vellaima

Well-known member
Joined
Jan 29, 2003
Messages
109
Code:
Dim fileName as String = "Trial1.txt"
Response.Addheader("Content-Disposition", "attachment; filename=" & fileName)
Response.ContentType = "text/plain"

The above program works fine. The problem is I am getting the message "You are downloading the file: abc.aspx from localhost"

How can i change it to "Trial.txt from localhost"

Please do help me out
 
Thanks, very much Robby. It worked very well. The user can download any type of files. So, how should i write the ContentType. Could you please tell me how to go about for it.
 
Back
Top