I am using WebBrowser component where I display the web site.
For example:
The HTML source code which let the user choose a color:
<input type="text" name="firstname" value="the name entered by user">
<input type="radio" name="myradio" value="red">Red
<input type="radio" name="myradio" value="blue" checked>Blue
<input type="radio" name="myradio" value="white">White
In C# code (C# Application), I wanted to get the value selected by the user.
I have the below code for getting their values:
========================
HtmlDocument document = this.webBrowser1.Document;
firstName = document.All["firstname"].GetAttribute("value");
color = document.All["myradio"].GetAttribute("value");
========================
I can get the correct value from the firstname textbox, however, the "color" radio button always returns the value "red" event when Red is not selected.
Please help