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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:40:20+00:00 2026-06-02T01:40:20+00:00

I am displaying a panel that containg a button. When the user clicks the

  • 0

I am displaying a panel that containg a button. When the user clicks the button, it does some processing and then downloads a file for the user. The code for that is shown here:

    private void OpenForm(string content, string formName)
    {
        Byte[] bytes = System.Text.Encoding.Default.GetBytes(content);

        this.Response.AppendHeader("Content-Type", "application/msword");
        this.Response.AppendHeader("Content-Length", bytes.Length.ToString());
        this.Response.AppendHeader("Content-disposition", "attachment; filename=" + formName);
        this.Response.BinaryWrite(bytes);

        ReturnToMemberScreen();

        this.Response.Flush();
        this.Context.ApplicationInstance.CompleteRequest();
    }

In the function ReturnToMemberScreen, I am changing the visibility of some panels. Here is the function:

    private void ReturnToMemberScreen()
    {
        this.panelMappings.Visible = false;
        this.MemberEditPNL.Visible = true;
    }

I can download the file perfectly fine, my issue is that the visibility of my panels don’t change. Does it have something to do with writing to the Response like I am?

  • 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-02T01:40:23+00:00Added an answer on June 2, 2026 at 1:40 am

    Looking closer, I think I cannot make any changes to the page because I am changing the Content-Type of the response from “text/html” to application/msword when I do this:

    this.Response.AppendHeader("Content-Type", "application/msword");
    

    As I result, I am making all my changes with CSS and Javascript instead. By default, I set my panels to either show or hide using css:

    .hide     
    {         
        display:none;     
    }
    
    .show
    {
        display:block;
    }
    

    Then I set the OnClientClick of the button to the following Javascript function to change the display:

    function visible() 
    {
        document.getElementById('<%=panelForms.ClientID %>').style.display = 'none';
        document.getElementById('<%=MemberEditPNL.ClientID %>').style.display = 'block';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am displaying video over panel using custom allocator sample, for some file it
I have a jQuery sliding panel that is not displaying a jQuery carousel within
I am displaying two DIV panels with the code below. The only difference between
Displaying Type here to ... until the user enters text into a TextBox is
There's a dropdown displaying 1-10 from where the user selects the number of textboxes
I'm displaying user messages through templates using RequestContext in Django, which gives access to
I've built a log-in composite that I am displaying in my application entry-point to
We currently have a WebForms control with an update panel. The code-behind contains logic
I have a user condrol that may have several instances created and I am
How to do that my HUD Window panel (Second window) will be in front

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.