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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:25:17+00:00 2026-06-05T14:25:17+00:00

I have several applications that can successfully display ‘standard’ documents via a browser. I

  • 0

I have several applications that can successfully display ‘standard’ documents via a browser. I use the normal way that most samples on the internet uses in order to display documents, i.e.

HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.ClearContent();
response.ClearHeaders();
response.Buffer = true;
response.ContentType = "application/pdf";
response.AddHeader("Content-Disposition", "attachment;filename=file.pdf"; 
response.BinaryWrite(SomeBinaryArrayObject);
response.Flush();
response.End();

However, on my current application, this is being called from an UpdatePanel and this seems to cause an AJAX error (as I found out googling as well):

Check here for the error message I received

I would like to know if there is any OTHER way to call up documents from a browser, other than using Response.write, or is there any way around the AJAX/Response.Write issue? I would prefer them opening in the browser, but if they opened in an associated application, that would be fine too, most if not all our clients have things like Adobe and MS Office installed in any case.

Any help would be welcome!

  • 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-05T14:25:19+00:00Added an answer on June 5, 2026 at 2:25 pm

    There isn’t any other way to call up documents in the browser (otherwise it would be a huge security issue). The only way around is to add your download control as an UpdatePanel Postback trigger. That causes a full postback and allows the browser to download and/or activate the associated application.

    Another solution might be to use flash or java applets.

    Update: In case you your postback control in inside a gridview, you don’t need to cause a full post back on all controls in the grid, you can always trigger only on the control that you need it on. On the rowdatabound event, search for the control and add it to the triggers as follows:

    Protected Sub gE_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gE.RowDataBound
        Dim lapt_Trig As New AsyncPostBackTrigger
        lapt_Trig.ControlID = e.Row.FindControl("MyButton").ID     
        up_UpdatePanel.Triggers.Add(lapt_Trig)    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several web applications that make use of packages using WebActivator. On my
We have several applications that use Apache HTTPClient 3 to make HTTP requests. Recently
I have several windows applications that can be access through an SQL account. I
In my game application I have several different activities that all can be accessed
I am using eclipse as a development environment. I have several applications that link
I have several web applications in production that utilize NFS mounts to share resources
I have a library project that should be the base for several web applications.
I can successfully build a VB6 application that relies upon several DCOM settings on
We have several applications that are installed in several departments that interact with database
Background: I work in a suite of ASP.NET applications that have several different modules.

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.