Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

showing and managing websites in c#

I want to do 4 things with an external website:
-load it into webbrowser
-get inner text of some tags (located by class parameter)
-add java script code to the source of loaded website
-execute that script

I'm using Windows Forms and C#. I started with using WebBrowser, however i coudn't add any code to the source of it. I found that i should use IHTMLDocument2 for that, so I changed WebBrowser to AxSHDocVw.AxWebBrowser (which is COM version of the same thing). Now i can load page, but i have no idea how to get inner text of some tags (how to find tags in general) and how to execute a script (either by firing a "on click" event, or executing the script by name). Is there a way to do that without using pointer, with C#? Or perhaps is there any other way for doing what I need (using WebBrowser, this COM object or whatever)? I only need some example of how to do those things and i'll do the rest.
1 Solution
DeadeyyeAuthor Commented:
Exoerteez - i've already made this, i was asking about how to get tags and script with this interface. Anyway, I found that you can simply use WebBrowser control to acces and modify your source code of www, so it fits me perfectly

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now