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

  • Home
  • SEARCH
  • 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 6995481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:01:52+00:00 2026-05-27T20:01:52+00:00

I currently have a handler that when navigated to prompts the user to download

  • 0

I currently have a handler that when navigated to prompts the user to download a file.

I need to programmatically disable this box and allow for the file to auto download when that page is hit. Would it be easier to read that pages text and then rewrite my own file somehow?

Which would be the best approach and how would I go about doing it.

Currently I have

Sub ProcessRequest(ByVal context as HttpContext) Implements IHTTPHandler.ProcessRequest
Dim filename as String = myfile.csv
context.Response.ContentType = "text/csv"
context.Response.WriteFile(filename)
End Sub

This currently prompts the user to choose a save location and file name etc etc before starting the download.

EDIT:

As mentioned in a below response this has to be possible. Download sites automatically start downloads all the time as soon as you navigate there.

I have come across some other sites that mention IE settings could be changed? I don’t know if this could be usful in finding a solution

Super User disable Popup for download

  • 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-27T20:01:53+00:00Added an answer on May 27, 2026 at 8:01 pm

    Yes you can. You create a form on the page, hide it and have it downloaded via javascript. It might look something like below. You set up an html form, and have it submitted by Javascript when the page has loaded. I’ve just tested in Chrome / Firefox / IE. Think about it, those download sites you see that show a message like “Your download should begin within 5 seconds, if it does not click here…”. You may want to include a direct link incase of any browser settings that may block.

    Note use Response.Clear() prior to the other response code.

    <h2>Index</h2>
    
    <!-- Where /Download/GetFile will cause your code as posted to execute. -->
    
    <form action="/Download/GetFile" id="form1" method="post"></form>
    
    <script type="text/javascript">
    
        document.getElementById("form1").submit();
    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a query that looks like this: SELECT NON EMPTY ([Measures].[TOTAL]) ON
I am currently have this message handler line: MESSAGE_HANDLER(`WM_SETREDRAW`, onSetRedraw) I would like to
I currently have some C code that uses sigaction to associate a handler to
I have a simple custom error handler that writes in a error log file
I currently have a download site for my school that is based in .net.
We currently have a utilities class that handles a lot of string formatting, date
I currently have a need for a custom ListViewItem class - let's call it
I currently have links w/ class=ajax that I want to retrieve the element with
I have an event handler that needs to do something to one of its
I currently have code similar to this for a form: $('#some-form') .submit(function() { //

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.