C# Process.Start

Posted on 2011-10-05
Last Modified: 2012-05-12
I want to open a URL and click on the link that has id tag.

I'm using Process.Start(strLink); to open the URL.  Inside the page, there are several links with ID and NAME tag.  Is there a way to do the "click" action on the specific link?

For example, if there are 2 links like below, can C# does the click on "overridelink" link?

<a href="javascript:closePage()">Click here to close this webpage.</a>
<A href='' ID="overridelink" NAME="overridelink" >Continue to this website (not recommended).</A>

Question by:ttta83
    LVL 5

    Accepted Solution

    you can't "click" with c# as a "click" is a client side event.  you can set window.location through javascript.

    if you just want the content of the link, use an HttpWebRequest in your code -

    Author Closing Comment


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 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

    18 Experts available now in Live!

    Get 1:1 Help Now