coolcurrent
Newbie
- Feb 15, 2011
- 25
- 0
is there any way i could make the webbrowser control load large textual pages faster. its taking about 5-10mins to loag blogs with about 500 comments
Public Function GetBetween(ByVal haystack As String, ByVal needle As String, ByVal needle_two As String) As String
Dim istart As Integer = InStr(haystack, needle)
If istart > 0 Then
' Dim istop As Integer = InStr(istart, haystack, needle_two)
Dim istop As Integer = InStr(istart + Len(needle), haystack, needle_two)
If istop > 0 Then
Try
Dim value As String = haystack.Substring(istart + Len(needle) - 1, istop - istart - Len(needle))
Return value
Catch ex As Exception
Return ""
End Try
End If
End If
Return ""
End Function
thanks, but how do extract the hidden fields knowing that i will then have to write a parser for that?
HtmlAgilityPack.HtmlNode.ElementsFlags.Remove("form");
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(content);
var nodes = doc.DocumentNode.SelectNodes("//input");
if (nodes != null && nodes.Count > 0)
{
foreach (var item in nodes)
{
MessageBox.Show("Found input field: " + item.Name);
}
}
else
{
MessageBox.Show("Found not input fields");
}
webkit or gecko browser is a very good alternative for webbrowser control. The only restriction is you cannot click programmatically by invokemember. There is no method available as of now like invokemember.
With WebKit there most definitely is. You can easily bridge the DOM on the page to the native code very easily, and even eval raw JS if required. It's a complete browser, therefore you've got full control over it. :\
hey there,
can you provide me with a sample code or something of that sort, for webkit, with calling eval raw JS. I am getting, what you meant there. My problem is somewhat like, sometimes i need to click on a div element (which essentially doesnt have the onclick property).
Can you show it to me, how can i accomplish that, with a webkit. thanks alot.