html代码:<html>
<head>
     <title>XI 3.0 Single Sign-On Java InfoView</title>
 <link href="style.css" rel="stylesheet" type="text/css" />
</head><body>  
<div id="mainContainer">
<div id="sampleDescriptionDiv">
<h1 id="sampleTitle">XI 3.0 Single Sign-On Java InfoView</h1>
<p id="sampleDescription">Demonstrates how to Single Sign-On to XI 3.0 Java InfoView by logging onto BusinessObjects Enterprise and passing a serialized Enterprise Session.</p> 
</div>
<!-- Form to capture information necessary to run the sample
****************************************************** -->
<form id="sampleForm" method="post" action="java_enterprise_be12_sso_infoview.jsp">
<table class="infoTbl">
<th colspan="2" class="tableHeader">Required info</th>
    <tr>
         <td>CMS Name: </td>
         <td><input type="text" name="bo_cms_name" class="formField"/></td>
    </tr>
    
    <tr>
         <td>User Name: </td>
         <td><input type="text" name="bo_username" value="Administrator" class="formField"/></td>
    </tr>
    
    <tr>
         <td>Password: </td>
         <td><input type="text" name="bo_password" class="formField"/></td>
    </tr>
     
     <tr></tr>
     
    <tr>
<td>Authentication Type: </td>
<td>
     <select name="bo_auth_type" size="1" class="formField">
          <option value="secEnterprise">Enterprise</option>
          <option value="secLDAP">LDAP</option>
          <option value="secWinAD">Windows AD</option>
     </select>
</td>
    </tr>
    
    <tr>
         <td>InfoView Start Page: </td>
         <td><input type="text" name="infoview_url" class="formField" value="http://<hostname>:<port>/InfoViewApp/logon/start.do"/></td>
    </tr>
    
<tr>
<td></td>
<td><input id="submitBtn" type="submit" class="btn" value="Submit"/></td>
</tr>
</table>
</form>

<div class="infoDiv">
<table class="infoTbl">
<th colspan="1" class="tableHeader">Notes:</th>
<tr>
<td>
<p>You can view the <a href="readme.txt" target="_blank">Read Me</a> file for instructions on how to install this sample.</p>
<p>Please visit our <a href="http://devlibrary.businessobjects.com/" target="_blank">online library</a> for our up-to-date SDK help files.</p>
                        <p>Disclaimers and more info <a href="more_info.html">here</a>.</p>
                    </td>
</tr>
</table>
</div>

<div id="copyright">&copy; Business Objects Technical Support</div>
</div>
</BODY>
</HTML>
C#代码
[code=C#]
            HtmlDocument doc = myWB.Document;//获取Document对象    
            foreach (HtmlElement em in doc.All)
            {
                //查找所有文档元素
                string str = em.Name;
                //减少处理
                if (str == "bo_cms_name")
                    em.SetAttribute("value", cms);
                if (str == "bo_username")
                    em.SetAttribute("value", uid);
                if (str == "bo_password")
                    em.SetAttribute("value", pwd);//赋密码内容
                if (str == "infoview_url")
                    em.SetAttribute("value", port);
            }
            foreach (HtmlElement em in doc.All)
            {
                string str2 = em.GetAttribute("type");
                if (str2 == "submit")
                {                                       
                   em.InvokeMember("click");
                }
            }
其中给input赋值的都可以,就是触发点击没反应,
myWB.Document.Forms[0].InvokeMember("submit");

HtmlElement button = myWB.Document.GetElementById("submitBtn");
button.InvokeMember("click");
都试了,都没反应,怎么能触发点击呢?