0
I have the following snippet of HTML code :
This code belongs to a page of an Air OS radio (internet radio).
I need to reference this button inside a program made in Windows Forms and do a function so that it runs and the radio is restarted.
I could only get elements with id attribute, as follows:
HtmlElement username = webBrowser1.Document.GetElementById("username");
How do I reference this button that does not have "id" field? Remembering that the HTML code is not mine, I cannot edit it and put the "id" field".
I’m currently using the Webbrowser component, which would have some other way to access the radio and reboot without using Webbrowser?
Thank you.
<input ID="username" value="Yes, reboot!" type="Submit">
– Reginaldo Rigo
I can’t change the HTML code, it’s not mine.
– Vinix Gonzalez
You have to post more of the HTML. You’ll have to work exploring the hierarchy. I mean, it’s going to be necessary to find some "key" element and get the kids. Also, try [Edit] and be more specific in your question, it seems that you’re talking about ASP.NET MVC, I just understood that you want to manipulate by a web browser because I’m used to dealing with Winforms.
– Jéf Bueno
edited the question, I am using windowsforms and the webbrowser component to accomplish this task.
– Vinix Gonzalez
Just wanted to post more parts of HTML. This way can not help...
– Jéf Bueno
I just posted all the code
– Vinix Gonzalez
The text "Yes, reboot" will always be this?
– Jéf Bueno
will be yes! HTML code does not change.
– Vinix Gonzalez