C# Process.Start

Posted on 2011-10-05
Medium Priority
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

Accepted Solution

LlamaJoe earned 2000 total points
ID: 36922484
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 - http://www.csharp-station.com/HowTo/HttpWebFetch.aspx

Author Closing Comment

ID: 36927303

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 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