I have about 100 XML files(with XSL that will convert each one of them to HTML )
I am planning to use a webbrowser control to fetch the "*.html" file.
At the same time i want the HTML elements in webbrowser to act based on some event.
which means if i press some button outside webbrowser, the HTML element say a textbox should have its TEXT value changed to something else.
Its very important for me to handle HTML elements event based on its properties and value.
Please offer some ideas or solutions if anyone knows. (cas i dont find a hint anywhere else)
THANKS A BUNCH!
Loading
Tuhin PaulPosted Apr 19, 2023, 2:10 AM
sample code
replace 'path/to/html/file.html' with the path to your HTML file, and 'textbox-id' with the ID of the textbox element you want to modify.
Tuhin PaulPosted Apr 19, 2023, 2:09 AM
One possible solution is to use JavaScript to modify the HTML elements in the web browser control. You can inject the JavaScript code into the HTML file using the WebBrowser control's DocumentText property or Navigate method.
Sam HobbsPosted Apr 18, 2023, 8:23 PM
Update: Note that this question is more than 12 years old!
Sam HobbsPosted Apr 18, 2023, 8:21 PM
This might depend on whether you need to do the conversion once or if you need to do a conversion every time the XML files change.
I think the best solution would be to convert the XSL to do a different conversion, such as convert the XML to XAML.
Deepak RawatPosted Apr 18, 2023, 7:09 PM
No Not possible to directly convert HTML elements to Windows controls.