User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,596 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,407 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 410 | Replies: 0
Reply
Join Date: Aug 2007
Posts: 3
Reputation: mishrap is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mishrap mishrap is offline Offline
Newbie Poster

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

  #1  
Sep 6th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:55 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC