views:

237

answers:

2

We're using a control that uses Callbacks in our ASP.NET page.

  • The control works fine in FireFox, Google Chrome, etc.
  • The control works fine if we do not use ASP.NET AJAX History. As soon as we call this code, the callbacks stop working in IE (6, 7 and 8):

    ScriptManager.GetCurrent(Page).AddHistoryPoint("h", id);

  • I did some server side debugging to figure out that RaiseCallbackEvent was not fired in IE, but was fired for others.

  • I have debugged using Fiddler and observed that it was not querying the appropriate URL. The server returns an invalid request error.

Other browsers send the HTTP POST to: test.aspx

However, IE is sending it to: test.aspx%23&&h=12

This is because the URL in the browser's bar is test.aspx#&&h=12, because of our AJAX History Control.

How can I force IE to drop the anchor used for AJAX history when calling WebForm_DoCallback in JavaScript?

+3  A: 

Reading the contents on WebForm_DoCallback, I didn't see anything that set the url of the server call. This means that it is either getting it fromthe form action or sending it to the current page. Try setting the form's action attribute.

Gabriel McAdams
Looks promising! I will do more tests to confirm this fixes everything.
Jason Kealey
Wrote a blog post about this here: http://blog.lavablast.com/post/2010/01/13/ASPNET-callback-not-being-fired-in-Internet-Explorer.aspxThanks!
Jason Kealey
Good. I hope you're able to help others who are having the same issue.
Gabriel McAdams
A: 

Yes this has happend with me also. But then I just developed new code for ICallback Handler and it worked fine without any error. ICallbackEventHandler

ashish

related questions