Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...