c# - Set cookies to WebView Control -
I have cookies which are taken from the HTTP WebRive and I have to set these cookies on another page on the webview control .
How do I transfer these cookies into WebIv controls in the Windows 8.1 Store app?
I have found and it works well for me.
try {uri baseURI = new Uri (textiItxt); Windows.Web.Http.Filters.HttpBaseProtocolFilterFilter = New Windows.Web.Http.Filters.HttpBaseProtocolFilter (); Windows.Web.Http.HttpCookie Cookie = New Windows.Web.Http.HttpCookie ("cookieName", baseUri.Host, "/"); Cookie Value = "cookie value"; Filter.CookieManager.SetCookie (cookie, incorrect); Windows.Web.Http.HttpRequestMessage httpRequestMessage = New Windows.Web.Http.HttpRequestMessage (Windows.Web.Http.HttpMethod.Get, baseUri); WvTest.NavigateWithHttpRequestMessage (httpRequestMessage); } Hold (exception oEx) {// handle exception}
Comments
Post a Comment