ScriptManager.GetCurrent(页).IsInAsyncPostBack抛出运行时错误 [英] ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack throws an error at runtime

查看:329
本文介绍了ScriptManager.GetCurrent(页).IsInAsyncPostBack抛出运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一对夫妇,我是卡在什么显然似乎是一个很无聊的问题,我无法前进小时。

it's a couple of hours that I'm stuck on what apparently seems a very silly problem and I cannot move forward.

基本上,如果我尝试评估在任何一个ASP.NET Web窗体页的事件处理程序(即在Page_Load中)以下内容:

Basically if I try to evaluate the following at any of the event handlers of an ASP.NET Web Form Page (ie at Page_Load):

ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack

我总是得到以下错误:

I always get the following error:

System.Web.UI.IScriptManager'不包含'GetCurrent',没有扩展方法'GetCurrent接受型System.Web.UI.IScriptManager'的第一个参数的定义可以找到(是否缺少使用指令或程序集引用?)

'System.Web.UI.IScriptManager' does not contain a definition for 'GetCurrent' and no extension method 'GetCurrent' accepting a first argument of type 'System.Web.UI.IScriptManager' could be found (are you missing a using directive or an assembly reference?)

但是,如果我评价相同的任何嵌入的用户控件'事件我得到一个布尔值返回的。

However if I evaluate the same in any of the embedded UserControls' events I do get a boolean value returned.

我失去了一些非常基本的?!

Am I missing something very basic?!

谢谢,

朱塞佩·R.

推荐答案

您使用AjaxControlToolkit-的ScriptManager?
我也有问题,有时调试IsInAsyncPostBack值。

Are you using an AjaxControlToolkit-ScriptManager? I had also sometimes problems to debug the IsInAsyncPostBack value.

修改

ScriptManager.GetCurrent(Page).IsInAsyncPostBack

AjaxControlToolkit.ToolkitScriptManager.GetCurrent(Page).IsInAsyncPostBack 

这篇关于ScriptManager.GetCurrent(页).IsInAsyncPostBack抛出运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆