showing and managing websites in c#

Posted on 2008-11-19
Last Modified: 2013-11-17
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.
Question by:Deadeyye
    LVL 2

    Expert Comment

    LVL 1

    Accepted Solution

    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

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
    If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now