I'm writing an application using ASP.NET 4.0 and VS 2010 that navigates a website, selects options, and downloads files. I am stuck on the second part..
When i select an option from the HtmlSelect option, a server-side function call occurs which changes the layout of the web page to display more HtmlSelect lists (apparent from the source code of the web page). However, I don't know how to get this updated page after the change.
What I have right now:
{
__...
__b.DocumentCompleted -= new WebBrowserDocumentCompletedEventHandler(b_DocumentCompleted3);
__b.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(b_DocumentCompleted4);
__...
____{
______if (select.innerText.Contains("Select"))
________select.selectedIndex = 2;
______b.Refresh();
____}
}
private static void b_DocumentCompleted4(object sender, WebBrowserDocumentCompletedEventArgs e)
____{
______WebBrowser b = sender as WebBrowser;
______string response = b.DocumentText;
____}
But the application never reaches b_DocumentCompleted4(). I'm not even sure if that was necessary either.. Any ideas?


Reply With Quote

Bookmarks