首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

把autopostback设置为true后总是报错:Microsoft JScript 运行时异常: 找不到成员

2013-09-30 
把autopostback设置为true后总是报错:Microsoft JScript 运行时错误: 找不到成员。本帖最后由 haoxinqingha

把autopostback设置为true后总是报错:Microsoft JScript 运行时错误: 找不到成员。
本帖最后由 haoxinqinghaha 于 2012-08-02 13:12:28 编辑 把textbox的autopostback设置为true后,编译能通过,但对textbox输入信息并失去焦点时,总是报错:Microsoft JScript 运行时错误: 找不到成员。提示出错的是下面加亮部分:
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>
求高手指点!!
[解决办法]

引用:
就是把autopostback设置为true就会报错,设置为false就不报错。不知是哪里设置的问题还是怎么回事,现在就是autopostback不能用了,郁闷ing


你的页面可能有个ID为submit的Button控件吧,把这个button控件的ID该了应该就不会出错了

热点排行