How to access the elements within an <IFRAME>?
How to access the elements within an in WebBrowser 开发者_运维问答in C#.NET?
try this
webBrowser1.Document.GetElementById("idName").SetAttribute("value") = "ddddd" ;
var stuff=webBrowser1.Document.GetElementById("idName").GetAttribute("attribute");
it works for me when I need to get/set control data and get any html element value
Generally, you can't. C# and .NET are typically used in frameworks like ASP.NET to produce the content that is consumed by the browser. This happens on the server-side.
If .NET is installed on the client, then you can host a Windows Forms control in an HTML document in Internet Explorer but this is very, very non-standard, and I'd advise heavily against doing so.
As far as I understand you can access the controls inside the webbroswer control using the following code
WebBrowser1.Document.GetElementById("controlId").
Is this what you are looking for?
Additionally this discussion in daniweb might be of some interest to you.
精彩评论