为什么asp.net UpdatePanel破坏了我的网址(.aspx0)?

时间:2010-02-22 18:17:41

标签: c# asp.net updatepanel

我遇到了一个非常奇怪的错误。

我有一个在没有UpdatePanel的情况下运行良好的页面。当我用UpdatePanel包围东西时,我有这个错误:

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

页面名称为SearchTicket。 aspx 。当启用UpdatePanel时,它会尝试打开SearchTicket。 aspx0 ,显然不能这样做,然后返回404。

这是一个已知的错误吗?我在网上找不到关于它的线索。

注意:首次按预期加载页面。第一次更新就是这样。

1 个答案:

答案 0 :(得分:0)

试一试。我不知道为什么会这样做,但这可能会解决它。

试试这个:

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

我读过这可能也有用

     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

相关问题