__VIEWSTATE和__EVENTVALIDATION在网页的源代码中可以查看到,我在向Server提交当前页面时会改变一个按键的状态(使该按键的点击状态变为DISABLED),这样是不是在发送数据时采用新的__VIEWSTATE和__EVENTVALIDATION,而这两个域的新值我怎么来构造,请各位指点一下

解决方案 »

  1.   

    发送数据时肯定是采用新的__VIEWSTATE和__EVENTVALIDATION,,这个貌似不需要人工去构造吧
      

  2.   

    用input button好了,调JS _doPostPack()事件,在这之前可以做你需要的判断
      

  3.   

    网页上有提交的按钮:
    <input type="submit" name="btnSubmit" value="关闭工单" onclick="if (txtComments.value=='') {alert('请填写执行结果!'); return false;} return confirm('提交关闭这张工单,请确认!');" id="btnSubmit" class="button" /> 我想用WEBBROWSER实现自动提交,怎么来处理这个弹出的窗口.
    <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>
    _doPostPack()事件具体怎么来使用,请指点