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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:36:26+00:00 2026-05-13T11:36:26+00:00

When using ASP.Net Ajax to call PageMethods, how can I access the Http response

  • 0

When using ASP.Net Ajax to call PageMethods, how can I access the Http response headers from the “success” method?

For example:

PageMethods.DoSomething(
   function(result){successMethod(result)},
   function(error){errorMethod(error)}
);

function successMethod(result){
    //------how can I access the Http response headers from here? ------
}

Thanks for any help

  • 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-13T11:36:26+00:00Added an answer on May 13, 2026 at 11:36 am

    In your example, PageMethods.DoSomething should have a return value equal to WebRequest if it’s an asp.net web service proxy. This is provided so that you can manipulate the request after you’ve initiated it (i.e. cancel it etc).

    With this class you have an add_completed method which you can use to add a handler for when the web request completes. The signature for the callback is function OnWebRequestCompleted(executor, eventArgs), and the executor parameter in this enables you to get hold of extra response information. For example, you can get hold of the response headers with executor.getAllResponseHeaders(); which should be a map (named collection) of header names and values.

    So if you add a handler to the web request’s completed event immediately after making the service method call, it should work (there’s no web service in the world that can respond faster than two consecutive lines of code!).

    The previous hyperlink to WebRequest contains a full example of how wire this up. Notice, however, that this code uses the WebRequest directly.

    Asp.Net Ajax Web Service proxy classes use the WebServiceProxy class, and each proxy method ultimately call its invoke method, which returns the WebRequest instance.

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

Sidebar

Related Questions

I am using ASP.NET ajax to dynamically add/remove controls from a page without using
I'm using the AutoComplete control from the ASP.NET AJAX Control Toolkit and I'm experiencing
I'm using the ASP net Ajax toolkit and have a GridView within the UpdatePanel
Using the client-side ASP.NET AJAX library, I have created an instance of a client
Is there an ASP.NET AJAX framework other than just using UpdatePanel & Friends or
I am using asp.net MVC to develop an application that will have ajax interactions.
I'm using an older version of ASP.NET AJAX due to runtime limitations, Placing a
I am using MS AJAX ASP.NET Components (Calendar Extender) and I'm finding this problem.
Anyone have any experience creating a modal dialog box using AJAX and ASP.NET MVC?
Does anybody know of an up to date tutorial on using Ajax with ASP.net

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.