Download a file

I have a page that contains a link that it allows me to download the file "winzip81.exe".

This file is saved into my web site.
Private Sub MyLinkButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles lbDownload.Click
Dim FName As String
FName = "winzip81.exe"
FName = Server.MapPath(FName)
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", "attachment; filename='" + FName + "'")
Response.WriteFile(FName)
Response.Flush()
End Sub
The Dialog in order to save proposes:
File Name = "DownLoad" (it is the name of my page)
Save as = "Document" (I can choose also "All files")
I would want that the Dialog proposed:
File Name = "winzip81.exe"
Save as = "Application"
How I can make?
Iole

Milan, Italy



blue.starz@libero.it

0
iole
9/3/2002 2:24:33 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
944 Views

Similar Articles

[PageSpeed] 48

Hello look @ : view post 833372

regards
Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
0
haidar_bilal
2/20/2005 10:47:12 AM
Reply:

Similar Artilces:

Downloading form. How to hide form after file is downloaded.
 Hi,I've this problem:I've form which user fills before downlaod file:<%= Resources.Resources.YourName %>*:<asp:Panel ID="_getInfoPanel" runat="server">  Your Name:<asp:TextBox ID="_yourNameTB" runat="server" /> ...<asp:Button ID="_addButton" runat="server"               Text="<%$ Resources:Resources, Continue %>" onclick="_addButton_Click" /> </asp:Panel> and when _addButton(in event h...

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

WEB FORMS and datasetS (do I have to repeat the file definition in every web form?)
I am working on vb.net.I have a project with 35 web forms and an access file with 18 tables.Until now I have defined the oledbadapters in every form by dragging the tables from the server explorer tool box.This is not a good idea because every time that I make a change on the database design I have to drag the new definition on 35 web forms and I have to create the datasets again. This is boring and time consuming!The question is:WHAT CAN I DO TO HAVE THE FILE DEFINITION ONLY IN ONE PLACE AND THAT EVERY WEB FORM WOULD TAKE THE DATA ADAPTERS AND DATASETS FROM THERE? how about if you write a...

how to read a .txt file from .net (web form)
hi, how to read a .txt file line by line and place the contents in a .xls file. ex: if sample.txt file is... Name: abc Company: xyz info ltd. i want abc and xyz info ltd to be cut and saved in .xls file. i already have a .xls template with name and company fields. send solution.......

Reading Excel Files from a .Net Web Form
Hi, This might be a dumb question, but ... When reading an Excel file from a .Net Web Form, is it necessary to have Microsoft Excel actually installed on the client machine running the web form? Also, do the Excel files being read need to be saved as "values only" or can the values be extracted from a spreadsheet where the cells contain formulas? Thanks. -Wayne Hi, For the 1st part, Office is not necessary to be installed. But Download the Office XP PIAs and use them to develop Office XP solutions with Visual Studio .NET. For 2nd Part I think you need to use Values.Regar...

how to open .exe file in a web form in vb.net?
hi, Are there any one who know to open .exe file from a web form application? make a link like: My Exe ...

File Download Web form
Hello, I'm trying to write a web form that contains a list of LinkButtons - each link button represents a different file they can download. How do I force the "Save As" Dialog Box to appear when the user clicks on these links? I presume it would be some code you would add into the "Command" event of the link button?"There is no such thing as a bug, just an unexpected feature." this is what u want. This code work correctly void download(Object sender,EventArgs e) { try { System.String filename = "myFile.txt";//...

Does anyone have vb.net code to download files from web application?
Does anyone have vb.net code to download files from web application? if not could you specify resources for this stuff. and also tell me should i need the knowledge of http headers,modules etc to make this kind of problems more understandable. Thank you Veeresh Hi Veeresh, FYI: http://aspalliance.com/259 - by Shark Regards,...

How to locate a file on PB11.5.1 .NET Web Form Target
Hi, PowerBuilder 11.5.1 Build 4675 Local Web Hosting : Window XP Pro IIS , Home directory = "c:\inetpub \wwwroot" I use a very simple function "FileExists" to locate a file, but it always retun FALSE from below scripts. if FileExists(file_name) = False then MessageBox("Error", "Could not find this file~n" + file_name) Return -1 end if The file_name is specified like this "D:\PB11.5\TEST\test.srd." I can confirm that the file do exist on my machine on specified path. And, it return TRUE when I run on normal PB application t...

How to locate a file on PB11.5.1 .NET Web Form Target
PowerBuilder 11.5.1 Build 4675 Local Web Hosting : Window XP Pro IIS , Home directory = "c:\inetpub\wwwroot" I use a very simple function "FileExists" to locate a file, but it always return FALSE from below scripts. if FileExists(file_name) = False then MessageBox("Error", "Could not find this file~n" + file_name) Return -1 end if The file_name is specified like this "D:\PB11.5\TEST\test.srd." I can confirm that the file do exist on my machine on specified path. And, it return TRUE when I run on normal PB application targe...

How to locate a file on PB11.5.1 .NET Web Form Target
PowerBuilder 11.5.1 Build 4675 Local Web Hosting : Window XP Pro IIS , Home directory = "c:\inetpub \wwwroot" I use a very simple function "FileExists" to locate a file, but it always retun FALSE from below scripts. if FileExists(file_name) = False then MessageBox("Error", "Could not find this file~n" + file_name) Return -1 end if The file_name is specified like this "D:\PB11.5\TEST\test.srd." I can confirm that the file do exist on my machine on specified path. And, it return TRUE when I run on normal PB application target. A...

add/change name/delete server files via vb.net web form
I have the add(upload) part of this page figured out. I have an application with an "Images" sub directory. I know how to access the getfiles() method from the system.IO namespace. I am using a while loop to create a table with an edit button (so that you can change the name of the file) and a delete button so you can remove the file from the server. Each file is on a new line much like it would look if it was bound to a datalist or datagrid. Here is where I am clueless. Can anyone point me in the right direction? I am not looking for someone to write this for me, beca...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

Is it possible to allow user to download file (text document) to their handphone using Mobile Web Form?
Hi everyone Anybody knows whether is it possible to create a download and search features in mobile web form. I have display a list of items (menu) in the mobile web form and user are allow to download to its handphone and view it later. I have created the relevant form but counldn't link it up. Anybody know how to connect it? Do I need any port in order to connect it (such as smtp or ftp)? Hope anybody will reply. Regards...

.Net Web Form & Web Service Deployment
Hi all I have written some test web services and some web form applications and deployed them to my IIS. That's fine but I now want to deploy them to my real IIS server. I have created an msi for each but the problem is I seem to only be able to deploy to the default web site. Our default web site is turned off and instead we use several other sites. Does anybody happen to if Powerbuilder 11 supports non default web sites? If not do I need to hack the msi and if so can anybody suggest a suitable tool. I have Orca but it's not very friendly. Unless of course I knew exactly w...

Web resources about - Download a file - asp.net.web-forms

Don't Download This Song - Wikipedia, the free encyclopedia
" Don't Download This Song " is the first single from "Weird Al" Yankovic 's 12th studio album Straight Outta Lynwood . The song was released ...

Facebook Adds To Download Your Information
Facebook increased the amount of information users can access when they download their account histories using the social network’s Download ...

Download the Facebook IQ digital magazine - Facebook for Business
The Facebook IQ digital magazine puts all the insights, best practices and key stats in one place. Download it on your mobile and read it anywhere. ...

Downloads
Download previous versions of the Facebook for iOS SDK.

‘Silent updates’ for Android download latest version of Facebook without Google Play
... users to receive app updates without going through the Google Play store. Some Android users are now receiving “silent updates,” which download ...

Lifehacker, tips and downloads for getting things done
Lifehacker curates tips, tricks, and technology for living better in the digital age.

Technology Product Reviews, News, Prices & Downloads - PCMag.com - PC Magazine
PC Magazine is your complete guide to PC computers, peripherals and upgrades. We test and review computer- and Internet-related products and ...

Indie Music News, MP3 Downloads, Music Videos, Reviews - Stereogum
MP3s downloads, music videos, concert reviews, tour dates and contests. Updated regularly.

RN Download ThisShow (@RNDownload) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here RN Download ThisShow @ RNDownload ...

Kim Kardashian West ‘apologizes for breaking the App Store’ after issues with downloads of Kimoji app ...
... Kim Kardashian West (@KimKardashian) December 21, 2015 We worked so hard on this app & we know there are some issues due to the massive downloads ...

Resources last updated: 1/6/2016 8:04:21 AM