将文本框中的值插入网站中的字段

时间:2014-04-09 00:19:07

标签: c# web insert textbox

我在C#应用程序中有2个文本框。 我想将它们的值插入放在webPage中的其他两个文本框(使用C#中的webBrowser选项)

我该怎么做?

1 个答案:

答案 0 :(得分:0)

  

尝试:

string strValue = txtBox1.Text;
HtmlDocument doc = this.webBrowser1.Document;
doc.GetElementById("txtBox2").SetAttribute("Text", strValue);