简体   繁体   中英

c# web browser insert text into textarea

how to insert text into textarea using .net web browser ? i've tried many ways, but none of them worked

here's my try

HtmlElement element4 = WebBrowser1.Document.GetElementById("description");
element4.SetAttribute("value", "text");

but as i said none of them worked

Something like:

element4.InnerText = "text";

Assuming GetElementById worked and you have a valid reference in element4 , this should do it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM