Allows to set a credentials to work with password protected HTML documents, e.g. set userName and password

Namespace:  SautinSoft
Assembly:  SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 5.8.2.8

Syntax

      
 C#  Visual Basic 
public CookieContainer Cookies { get; set; }
Public Property Cookies As CookieContainer

Examples

CopyC#
SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf();
string url = "http://www.google.com";
CookieContainer myCookies = new CookieContainer();
Cookie userName = new Cookie("username", "bob");
myCookies.Add(new Uri(url), userName);
Cookie password = new Cookie("password", "bobpassword");
myCookies.Add(new Uri(url), password);
h.Cookies = myCookies;

See Also