views:

41

answers:

1

I'm experiencing a very weird bug.

I have a page that works very well without the UpdatePanel. When I surround things with UpdatePanel, I have this error:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /SearchTicket.aspx0

Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

The page name is SearchTicket.aspx . When UpdatePanel is enabled, it tries to open an SearchTicket.aspx0, and obviously can't do it, then returns a 404.

Is this a known bug? I've found no clue on the web about it.

Note: The page loads as expected for the first time. The first update makes this happen.

A: 

give this a shot. I don't know why it's doing that, but this may fix it.

Try this:

function pageLoad(sender, args) {
if(args.get_isPartialLoad()) {
    var form = $get('Formname');
    form._initialAction = form.action = '../SearchTicket.aspx';
 }
}

I've read this may work also

     Sys.Application.add_load(function()
{
   var form = Sys.WebForms.PageRequestManager.getInstance()._form;
   form._initialAction = form.action = window.location.href;
});

Check out this site.

And perhaps this one may help you

Eric
thanks eric! the rewritepath at beginrequest made the page restart after ajax call success, so everything was reseted (however, the ajax call succeeded, things appeared like predicted, before the page restart). These two js didn't worked in my page. the second doesn't compile, and the first says that this $get doesn't exist. =/
Victor Rodrigues
instead of $get use document.getelementbyid(id) (with correct capitalization)
Eric
the code didn't return an error, but .aspx0 was loaded again. I gave up using UpdatePanel for this page, at this time. Deadline sucks, UpdatePanel was not essential.
Victor Rodrigues