We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dialog

Thread ID:

Created:

Updated:

Platform:

Replies:

34374 Sep 8,2005 07:02 AM Sep 29,2005 01:57 AM ASP.NET Web Forms (Classic) 1
loading
Tags: FAQ
randa
Asked On September 8, 2005 07:02 AM

Hi everybody can anyone answer my question please? How do i show the Dialog of download to the user once he has chosen to download or open the file to his local system?(in asp.net(vb.net)) >Could you please send me the piece of code for this operation?

Anubhav Sharma
Replied On September 29, 2005 01:57 AM

There are two ways of doing it. 1. Reponse.Redirect to the file which u want to download. The explorer will himself display the dialog. 2. Use the following c# code: string filepath = Request.QueryString["file"]; System.IO.FileInfo file = new System.IO.FileInfo (filepath); if ( file.Exists ) { Response.Clear(); Response.ContentType "application/octet-stream"; Response.AddHeader ("Content-Disposition", "attachment; filename = " + file.Name ); Response.AddHeader ("Content-Length", file.Length.ToString() ); Response.Flush(); Response.WriteFile(file.FullName); > Hi everybody can anyone answer my question please? >How do i show the Dialog of download to the user once he has chosen to download or open the file to his local system?(in asp.net(vb.net)) > >>Could you please send me the piece of code for this operation?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;