postBackSettings.async is null or not an object 解决方法

这段时间遇到一个问题,同一页面同时存在Ajax和服务器端Button控件时且Button控件不在Ajax的容器中,Button的单击事件有可能会触发一个“postBackSettings.async  is null or not an object”的一个错误,此时可以将Button改为LinkButton解决这一问题。

具体貌似Button与linkbutton的回发机制不同的缘故。默认情况下,Button 控件使用 html POST 操作提交页面。LinkButtonImageButton 控件不能直接支持 html POST 操作。因此,使用这些按钮时,它们将客户端脚本添加到页面以允许控件以编程方式提交页面。(因此 LinkButtonImageButton 控件要求在浏览器上启用客户端脚本。)

posted @ 2009-06-04 14:29  蚕宝宝  阅读(351)  评论(0编辑  收藏  举报