在WebBrowser中浏览和讯的博客,留言始终不成功,
在IE中则正常,留言成功用fiddler看了一下
textview
成功的
<html>
<head>
</head>
<body>
    <form method="post" action="http://xbr-0.blog.hexun.com/CommentCode_type0.html" id="comment_form" name="comment_form">
        <input type="hidden" name="result_code" id="result_code" value="1" />
        <input type="hidden" name="ArticleID" id="ArticleID" value="2193865" />
        <input type="hidden" name="CommentID" id="CommentID" value="36939970" />
        <input type="hidden" name="Username" id="Username" value="北京家教" />
        <input type="hidden" name="UserUrl" id="UserUrl" value="http://beijing.jiajiao-edu.com/" />
        <input type="hidden" name="UserID" id="UserID" value="0" />
        <input type="hidden" name="UserBlogName" id="UserBlogName" value="" />
        <input type="hidden" name="Blogname" id="Blogname" value="xbr_0" />
        <input type="hidden" name="Title" id="Title" value="Re: 高手都不用闪光灯" />
        <input type="hidden" name="Content" id="Content" value="[:-D][:-D]" />
        <input type="hidden" name="PostTime" id="PostTime" value="12/5/2009 8:42:18 PM" />
        <input type="hidden" name="HasUnsafeWords" id="HasUnsafeWords" value="False" />
        <input type="hidden" name="IsAnonymous" id="IsAnonymous" value="True" />
    </form>    <script>
    document.getElementById("comment_form").submit();
    </script></body>
不成功的<html>
<head>
</head>
<body>
    <form method="post" action="http://A2006155100.blog.hexun.com/CommentCode_type0.html" id="comment_form" name="comment_form">
        <input type="hidden" name="result_code" id="result_code" value="5" />
        <input type="hidden" name="ArticleID" id="ArticleID" value="" />
        <input type="hidden" name="CommentID" id="CommentID" value="" />
        <input type="hidden" name="Username" id="Username" value="" />
        <input type="hidden" name="UserUrl" id="UserUrl" value="" />
        <input type="hidden" name="UserID" id="UserID" value="" />
        <input type="hidden" name="UserBlogName" id="UserBlogName" value="" />
        <input type="hidden" name="Blogname" id="Blogname" value="" />
        <input type="hidden" name="Title" id="Title" value="" />
        <input type="hidden" name="Content" id="Content" value="" />
        <input type="hidden" name="PostTime" id="PostTime" value="" />
        <input type="hidden" name="HasUnsafeWords" id="HasUnsafeWords" value="" />
        <input type="hidden" name="IsAnonymous" id="IsAnonymous" value="" />
    </form>    <script>
    document.getElementById("comment_form").submit();
    </script></body>
为什么啊,同样的操作啊,可是在WebBrowser中值好像就没提交上去,帮帮派,提个意见也好

解决方案 »

  1.   

    直接在webBrowser内打开的网上填写内容再提交的吗?
      

  2.   

    HtmlElement btnSubmit = webBrowser.Document.All["submitbutton"]; 
    HtmlElement tb = webBrowser.Document.All["name"]; btnSubmit.InvokeMember("click"); 
      

  3.   

    在webbrowser中提交的时候会新弹出一个窗口http://xxxxxxxxxxxx.blog.hexun.com/CommentCode_type0.html而在IE中则不会