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 8674587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:44:45+00:00 2026-06-12T19:44:45+00:00

ASP.Net Webforms pages are wrapped in a massive form, which restricts other forms on

  • 0

ASP.Net Webforms pages are wrapped in a massive form, which restricts other forms on the page because nested forms don’t work. This is intentional because in a webforms project, there can only be one form per page, and all of the server/client interaction require it. In order to build a custom form, I put together a modal dialog in this way. In order to allow for proper error messages from the server, my modal dialog has to post back to itself. In order to do this, I followed this trick to use the form target as the name of the window the dialog is in.

The problem comes when I try to add a button to download a file. When I try to download a file from this dialog now, nothing happens. I can redirect my response to the file in question, but I can’t write the file to the response because the dialog box just sits there when I click the button and nothing happens.

  • 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-06-12T19:44:47+00:00Added an answer on June 12, 2026 at 7:44 pm

    After quite some time researching and building a small test case, I found out that there are several interesting factors here.

    1. Response.WriteFile() works fine in webforms, even when the form is set with a target of the current window.
    2. Modal dialogs can download files perfectly fine, unless the form is set to the target of the current window.

    Through extensive testing, this appears to be an obscure bug, or perhaps even a strange attempt at security. This also appears to be specific to IE 8, though I didn’t get to test other versions of IE.

    The trick to allowing the download inside the modal dialog is to change the form’s target.

    function downloader() {
        document.getElementById("form1").target = "_blank";
    }
    

    This fixes the IE bug and appears to work in all other browsers (though I couldn’t get opera to show the pop up at all, even with “allow all popups”).

    Thought my day of toiling shouldn’t go to waste and maybe this will help someone else in the future.

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

Sidebar

Related Questions

I have a asp.net webforms page in which I'm using the jqGrid component. The
Coding Platform ASP.NET 4.0 WebForms on IIS7.5 If I request a page blahblah.aspx which
I'm adding some ASP.NET MVC pages to an existing ASP.NET Web Forms project. I've
I have a hybrid ASP.NET WebForms/MVC project. In my Master Page, I have a
I have an ASP.NET Web Forms web site. It has a page inside of
With ASP.NET Webforms, I could drag and drop a control on a form and
can I include normal asp.net pages (webforms or mvc) in a Dynamic Data web
One of our ASP.NET WebForms 3.5 pages just suddenly decided not to render the
My project is in Asp.Net Webforms using C#. On one of my web pages,
Asp.net WebForms and MVC has a concept of Masterpages which make it easy to

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.