First of all, i would like to say I was not able to post from Jan-June…as it was a hectic period.I am back now..:)
P.S.:
codes given below worked for me,u all need to find the code snippets to include from debugging.I have striked the parts that need to be changed.
- If the link/button to be clicked has id,eg.
<span id=”login”>Log On</span>
Here is the code:
HtmlElement button = webBrowser1.Document.GetElementById(“login“);
button.InvokeMember(“click”);
- If the link/button to be clicked,do not has an id..
foreach (HtmlElement links in webBrowser1.Document.Links)
{
if (links.InnerHtml.StartsWith(“<IMG title=” , StringComparison.OrdinalIgnoreCase))
{
string tempHref = links.OuterHtml;
string[] tempUrl = Regex.Split(tempHref, (“(\”)”));
webBrowser1.Navigate(address+tempUrl[1]);
}
}
Done!! 🙂
Is it?
Recent Comments