I have no experience with webbrowser control I'm trying to do the following: Navigate to website and to scrape the cookie values it gives back (specific with regex). I tried to search for this here & google there is no information about this, Are the webbrowser control connected to IE? This will be impossible to read the values right? Any way to capture the cookies? Like CookieContainer?
I have one code i use with httpwebrequest it can be an example to what I'm trying to do with webbrowser control:
List<string> cookieValues = new List<string>();
foreach (Cookie cookie in agent.LastResponse.Cookies)
{
cookieValues.Add(cookie.Value);
}
foreach (string i in cookieValues)
{
Match match2 = Regex.Match(i, @"bert=([\w]*)",
RegexOptions.IgnoreCase);
// Ensure match
if (match2.Success)
{
// Finally, we get Group value and display it.
key2 = match2.Groups[1].Value;
}
Thanks for the help like always!