Then you should look into that first. The Document property of a WebBrowser control is an HtmlDocument object that provides the root access to the DOM (document object model). It has methods GetElementById and GetElementsByTagName that allow you to access specific elements in the document as HtmlElement objects and then do things to them, e.g. call SetAttribute to set the value of an input tag or call InvokeMember to click a button. Without understanding these principles, all you can do is copy and paste someone else's code without understanding what it does.