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

新手怎么C#写网页按钮功能

2012-09-15 
新手求教:如何C#写网页按钮功能这个是网页源代码HTML codetd valigntop classcGray p12 aligncen

新手求教:如何C#写网页按钮功能
这个是网页源代码

HTML code
        <td valign="top" class="cGray p12" align="center">        <div style="width:400px;margin:0 auto;"><br /><textarea onfocus="captcheAction()" name="post_body" id="post_body" class="textarea" style="margin-bottom:15px;"></textarea></div>        <div style="margin:0 20px;width:400px;">            <div id="captche" style="display:none;height:25px;float:left;width:190px;">&nbsp;</div>            <div style="float:right;">            <input type="image" name="imageField" id="imageField" src="/views/templates/default/ue/loginicon.gif" class="ebutton submit_reply" width="81" height="24" value="提交" align="absmiddle" /> Ctrl+ENTER提交            <input type="hidden" name="ubb" value="on"/>            </div>        </div>        </td>

如何把提交写进程序的 按钮呢
现在2个控件,webBrowser button
网页显示网站按钮 C#按钮点击等于网站的按钮

[解决办法]
你是像通过webBrowser加载的一个网页,然后点击窗体上的按钮操作网页里面的按钮吗?如果是这样,那么如下实现:单词手打的,不知道有没有错,你自己看下就知道了…
HtmlElement htmlBtn = webBrowser.Document.GetElementByID("网站中按钮ID");
htmlBtn.InvokerMothed("click");

热点排行