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:


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


SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf();
string url = "";
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