Access a link programmatically using HTMLDocumetn

Jun 5 2007 12:14 PM

I have used the code below to access the frames within a webpage and the links within the frames. All I need to do now is find a way to go to a link in particular without the user clicking on the link. Does anyone know a way to do that?
{

string linkNeeded = null;

HtmlWindow currentWindow=myWebBrowser3.Document.Window;

foreach (HtmlWindow frame in currentWindow.Frames)

{

finalFrame = frame.Url.ToString();
frameArray.Add(finalFrame);
listBox1.Items.Add(finalFrame);

foreach (HtmlElement linkElem in frame.Document.Links)

{

frameLinksHash.Add(linkElem.GetAttribute("HREF"),"Url");

}


}

linkNeeded = frameLinksHash.ContainsKey("http://10.170.8.133:8080/OvisDashboard/jsp/StatusWorkspaceView.jsp");

}

}