Diego
Diego

Reputation: 2362

Read and Write Dynamic HTML in WinForm

I am using a WinForm App, in c#, framework 3.5. I have a webBrowser control where I render a Dynamic HTML like this

 webBrowser1.DocumentText = 
         @"<html>
           <input type=radio name=group1 value=Milk> Milk<br>
           <input type=radio name=group1 value=Butter> Butter<br> 
           </html>";

I write two Option Buttons, where the User will click one or another...

When the user click "OK" I need to read the DocumentText, and realize where Option Button is clicked.

It is possible?

Upvotes: 0

Views: 419

Answers (1)

Diego
Diego

Reputation: 11

I found the solution.. using the ID or the input object. as In javascript.

webBrowser1.Document.GetElementById("ID").GetAttribute("checked")

Upvotes: 1

Related Questions