public class CookieAwareWebClient : WebClient { private CookieContainer m_container = new CookieContainer(); protected override WebRequest GetWebRequest(Uri address) { WebRequest request = base.GetWebRequest(address); if (request is HttpWebRequest) { (request as HttpWebRequest).CookieContainer = m_container; } return request; } }CookieAwareWebClient client = new CookieAwareWebClient();string page =client.DownloadString(hdnSelectedLink.Value);