-
Aug 28th, 2023, 12:42 AM
#1
Thread Starter
Junior Member
Pass Login details from main website to popup window automatically using WebView2
The following link shows how to pass login details to new window using Webbrowser control
https://stackoverflow.com/questions/...ndow-i-created
Is there a way to implement this functionality in WebView2?
I have tried the option of navigating popup url to 2nd webview2 control with e.handled = true combination but this code is not working when 2nd website navigated from popup window takes login details from main website automatically(which cannot be passed while navigating through code)
-
Aug 31st, 2023, 10:06 AM
#2
Re: Pass Login details from main website to popup window automatically using WebView2
the link you posted refers to making popups MDIchilds of the application. your thread title says pass login details to popup. so not the same thing.
you usually pass logon details with a cookiecontainer. it appears this is how it's done with webview2: https://github.com/MicrosoftEdge/Web...ack/issues/644
I resolved it by avoiding the conversion: I hold onto a list of CoreWebView2Cookie instances captured from (A) and then set them into the second instance of the WebView2 control (B) using CoreWebView2.CookieManager.AddOrUpdateCookie() in the handler for the CoreWebView2InitializationCompleted event (in B).
-
Oct 5th, 2023, 12:44 AM
#3
Thread Starter
Junior Member
Re: Pass Login details from main website to popup window automatically using WebView2
e.NewWindow = WebViewpop.CoreWebView2 under NewWindowRequested event solved my issue. It passes all the required details automatically.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|