C# - 使用WebBrowser控件传递字符串文本框的网页 [英] C# - Pass string to textbox in web page using the webbrowser control

查看:389
本文介绍了C# - 使用WebBrowser控件传递字符串文本框的网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法把一个字符串的值,并传递到一个文本框的网页内,而使用WebBrowser控件?


解决方案

 的HTMLDocument DOC = this.webBrowser1.Document;
doc.GetElementById(MYID)的setAttribute(值,someValue中);

试试这个

Is there a way to take the value of a string and pass that to a textbox within a web page while using the webbrowser control?

解决方案

HtmlDocument doc = this.webBrowser1.Document;
doc.GetElementById("myId").SetAttribute("Value", "someValue");

try this

这篇关于C# - 使用WebBrowser控件传递字符串文本框的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆