Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- EO.WebBrowser
- Overview
- Installation and Deployment
- Getting Started
- Customizing WebView
- Advanced Topics
- Executing JavaScript Code
- JavaScript and DOM Interface
- Using JavaScript Extension
- Passing Complex Data Objects in between JavaScript and .NET
- Custom Resource Handler
- Custom Response Handling
- Handling Input Events
- Handling New Window
- Managing Browser Engines
- Setting WebView Options
- Authentication
- Working with Certificates
- Working with Local Files
- Printing Pages
- HTML 5 Support
- Using Plugins
- Debugging Web Pages
- Using Google Services
- EO.Wpf
- Common Topics
- Reference
Authentication |
When a web page requires authentication, EO.WebBrowser raises NeedCredentials event. If you do not handle this event, the default implementation displays a dialog asking users for a user name and a password.
You can handle this event to automatically supply user name or password, or replace the default dialog with your custom dialog. Inside your event handler, you should call Continue method on the event argument object to supply the user name and password. If you handle the event but does not call this method in your event handler, then the request will be canceled.
The following code demonstrates how to supply an user name and password directly without displaying any UI:
//Attach the event handler webView.NeedCredentials += WebView_NeedCredentials; private void WebView_NeedCredentials(object sender, NeedCredentialsEventArgs e) { //Replace "username" and "password" with the actual user name and password e.Continue("username", "password"); }