c# - Open Url & Set CookieContainer to Phone Web Browser -
i'm using c# , windows phone 8.1 universal.
i use code set cookiecontainer httpwebrequest , access site.
cookiecontainer cookiecontainer = new cookiecontainer(); public async task<string> begin(string url, bool savecookie = false) { string pagesource = ""; httpwebrequest request; request = (httpwebrequest)webrequest.create(url); //request.method = "get"; if (cookiecontainer != null && savecookie) request.cookiecontainer = cookiecontainer; try { httpwebresponse response = (httpwebresponse)await request.getresponseasync(); pagesource = new streamreader(response.getresponsestream()).readtoend(); pagesource = system.net.webutility.htmldecode(pagesource); } catch { } return pagesource; }
now have open url phone web browser{internet explorer}( forpayment page). how can launch url cookiecontainer ie?
also know code can launch url>
var options = new windows.system.launcheroptions(); options.treatasuntrusted = false; await windows.system.launcher.launchuriasync(new uri("url"), options);
thanks.
Comments
Post a Comment