user276351
user276351

Reputation:

How to access the elements within an <IFRAME>?

How to access the elements within an in WebBrowser in C#.NET?

Upvotes: 0

Views: 1520

Answers (3)

Luiscencio
Luiscencio

Reputation: 3965

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

Upvotes: 1

Shoban
Shoban

Reputation: 23016

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.

Upvotes: 0

casperOne
casperOne

Reputation: 74530

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.

Upvotes: 0

Related Questions