Hi, I have an asp.net web site in which I'm trying to insert some ajax call to gain some loading time on page opening.
SCENARIO: On page A.aspx I use JQuery $(document).ready() event to trigger an ajax call (via the ajax() method). The ajax call targets B.aspx page (in the same site) which renders a portion of html that I eventually inject into the existing markup of A.aspx.
After that ajax call the page is not able to fire __dopostback event properly anymore. In fact if I try to click to a pre-existing control in page A.aspx that should trigger a page postback B.aspx page is opened instead.
I tried to move B.aspx to another site, which runs in another application pool, but __dopostback call on A.aspx still tries to open B.aspx .
Here's the call:
$(document).ready( function() { $.ajax({ type: "GET", url: "./B.aspx", data:"username=xxx", dataType: "text", error: function(XMLHttpRequest, textStatus, errorThrown){ $('#agentResultErrorContainer').html('Error... ' + errorThrown); }, success: function(data){ $('#agentsResultContainer').html(data); } }); ... ... ... }
Other details: Site runs under .net 2.0 platform