Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Sys.WebForms.PageRequestManager.getInstance().add_endRequest not working

Sys.WebForms.PageRequestManager.getInstance().add_endRequest not working

Scheduled Pinned Locked Moved ASP.NET
debugginghelpjavascriptquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goodideadave
    wrote on last edited by
    #1

    I have an aspx page with jscript in a separate .js file. The page has an autocomplete extender, and I am trying to debug a problem by putting an alert in my EndRequestHandler function. For some reason, it's not executing either the EndRequestHandler or the InitializeRequest functions. It executes OnPageLoad without error, as well as another jscript function hooked to a button click event further south. What am I doing wrong? Thanks for any clues for the clueless.

    function OnPageLoad()
    {
    // OnPageLoad() is defined in _smfcommon.js, which is included in all pages.
    // We override it here so we can use the EndRequestHandler and InitializeRequest functions
    // in this page.

    // Add initializeRequest and endRequest
    Sys.WebForms.PageRequestManager.getInstance().add\_initializeRequest(InitializeRequest);
    Sys.WebForms.PageRequestManager.getInstance().add\_endRequest(EndRequestHandler);
    
    return;
    

    }

    // Called when async postback begins
    function InitializeRequest(sender, args) {
    alert("You are in the InitializeRequestHandler function."); // breakpoint here
    }

    // Called when async postback ends
    function EndRequestHandler(sender, args)
    {
    // this function is run after an Ajax partial postback occurs

    alert("You are in the EndRequestHandler function."); // breakpoint here

    if (args.get_error() != undefined)
    alert("There was an error" + args.get_error().message);

    return;
    

    }

    My other signature is witty and insightful.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups