943,708 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 750
  • ASP.NET RSS
Sep 6th, 2007
0

While I am Downloading ,One Dialogbox will open.When user will be saving file name...

Expand Post »
While I am Downloading ,One Dialogbox will open.When user will be saving file name...that time I want to restrict user to change the file name ..I have written code below for downloading file.

Dim fs As System.IO.FileStream = Nothing
fs = File.Open(Server.MapPath("TextFiles/Branch/" + filenam + ".txt"), System.IO.FileMode.Open)
Dim btFile(fs.Length) As Byte
fs.Read(btFile, 0, fs.Length)
fs.Close()
With Response
.AddHeader("Content-disposition", "attachment;filename=" & filenam)
.ContentType = "application/octet-stream"
.BinaryWrite(btFile)
.End()
End With


With Regards,
mishrap
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mishrap is offline Offline
3 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: I want to create text file on clients local drive.Please help.
Next Thread in ASP.NET Forum Timeline: ASPX files not loading





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC