Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6722375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:26:23+00:00 2026-05-26T09:26:23+00:00

I am writing a webapplication in ASP.net. I am trying to make a file

  • 0

I am writing a webapplication in ASP.net.

I am trying to make a file dialog box appear for downloading something off the server.

I have the appropriate file data stored in a variable called file.

File has fields:
FileType – The MIMEType of the file
FilePath – The server-side file path

Here’s the code so far:

Response.Clear();
Response.ContentType = file.FileType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +     GetFileName(file));
Response.TransmitFile(file.FilePath) ;
Response.End(); 

GetFileName is a function that gets me the filename from an attachment object. I only store the path.

The above code is in a function called “Download_Clicked” that is an event that triggers on click. The event is mapped to a LinkButton.

The problem is that when I run the above code, nothing happens. The standard dialog box does not appear.

I have attempted the standard trouble-shooting such as making sure the file exists, and ensuring the path is correct. They are both dead on the mark.

My guess is that because my machine is also the server, it may not be processing properly somehow.

Thanks in advance.

Edit 1: Attempted putting control onto another page, works fine.

Edit 2: Resolved issue by removing control from AJAX Update Panel.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:26:24+00:00Added an answer on May 26, 2026 at 9:26 am

    See edit on initial post.

    Removed Ajax Update Panel to resolve the error. The panel was stopping the post back to the server.

    For more info, see Cris Valenzuela’s comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a log file from an ASP.NET application under IIS7, but
I'm writing an ASP.NET web application which will run on Windows Server 2008 (IIS7).
I'm currently writing a project in ASP.NET MVC. I have a web project and
I'm writing an ASP.NET 3.5 web application. There is a rather complex input form
I am writing web application using ASP.NET MVC + NHibernate + Postres stack. I
We are developing a web application using asp.net and sql server. We are required
I'm writing a log parser for an asp.net mvc2 web application. I use Entity
I need your advice. I'm writing an ASP.NET web application and I'm considering whether
I'm writing a ASP.NET web application. It dosen't use Web Forms or MVC. It
I am writing an ASP.NET application that will keep track of bandwidth being used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.