How to programmatically click a href

I am automating some web routines in vb.net. There is a hyperlink I need to click on programmatically; how would I do so?  Here is the href in the source code:

<a id="_ctl0_contentPlaceHolder_dgDocumentsByTransaction__ctl3_Hyperlink1" href="Ranks.aspx?View=DocumentVolumes&amp;transactiontype=837j Inbound">837j Rank By Partner</a>

For the other click buttons, this code is working:

For Each element As HtmlElement In m_document.getElementsByTagName("input")
            counter = counter + 1
            If element.Name = "signInControl:loginButton" Then
                Debug.Print("Sign In button element found")
                login = element.DomElement
                login.click()
                counter = 0
                Exit For
            End If
        Next element

How would I "click" the href link.
Thanks!!
pandkyonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Paul MacDonaldDirector, Information SystemsCommented:
When you get to the point in code where you need to "click the link" why not just
Response.Redirect("Ranks.aspx?View=DocumentVolumes&amp;transactiontype=837j Inbound")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pandkyonAuthor Commented:
paulmacd:

when I do that, I'm getting an error under the response.redirect... "Name "Response" is not declared.
0
Paul MacDonaldDirector, Information SystemsCommented:
Make sure you have "Inherits System.Web.UI.Page" (no quotes) just inside your page class.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

pandkyonAuthor Commented:
I'm using vb.net 2008  and when I plug in "Inherits System.Web.UI.Page" inside the page class, I get the following:   'System.Web.UI.Page' is not defined"      
0
Paul MacDonaldDirector, Information SystemsCommented:
This is a web page, right?  Not a win form?
0
pandkyonAuthor Commented:
it is a win form.
0
Paul MacDonaldDirector, Information SystemsCommented:
Ah, then ignore me.  Sorry!
0
arunragCommented:
"Response" object is part of System.web.http class. Since you are using a win form class, you will not be able to use the Response method. I have had the same issue. So i had to switch back doing the redirect process from the ASPX page rather than from the class.
0
pandkyonAuthor Commented:
ahh. that explains it.  So how would I in essence trigger the href?
0
moorhouselondonCommented:
I'm not a vb coder so please scuse my igorance.  If it's a winform application then can't you define the "href" as a label: underline it and colour it blue if you wish, then use the labels's onclick event to do whatever you want.
0
pandkyonAuthor Commented:
switch from win form and the redirect code worked.

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.