I want to Navigate my web browser with a defined function like:
webbrowser1.navigate (my defined function);
This webbrowser is defined in a user control so that any one can change its default web page
How can I define a function by which the path sets?
Try following code:
HtmlElementCollection ele = this.webBrowserControl.Document.GetElementsByTagName("Form");
foreach(HtmlElement currentElement in ele)
{
currentElement.InvokeMember("submit");
}
OR
webbrowser.Document.All["ID OF ELEMENT"].InvokeMember("click");
Hope Its helpful.
来源:https://stackoverflow.com/questions/15847916/how-can-i-navigate-a-webbrowser-programmatically