Hello!

Tell me, please, how can you programmatically fill in the field: <input type="file"...> in WebBrowser C #?
I wanted to make it through WinAPI, but maybe there is another solution?
On the Internet, I could not find anything!

  • "how to programmatically fill in the field" - wait for the document to load, then find the tag - GetElementsByTagName and SetAttribute (...). see here - Stack

1 answer 1

Somewhere in the depths of WebBrowser there is a property that contains the code of the open page, if it is writable, you rip out the code, edit it (for example, through HtmlAgilityPack) and push it back.

  • Thank! But I probably will do it through WinAPI, because This page uses JS to transfer data to the server. - cas