Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web browser control and bypassing authentication
Message
From
03/01/2005 12:38:35
 
General information
Forum:
ASP.NET
Category:
Web control library
Miscellaneous
Thread ID:
00973739
Message ID:
00973874
Views:
16
>Sorry, I forgot you mentioned you're using the IE Control inside the WinForm:
>
>You'll also need this code:
>
>
>// In the Initialize Component Method you'll need to add this line
>this.WebBrowser.DocumentComplete +=
>     new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler
>     (this.WebBrowser_DocumentComplete);
>
>
>// in the WebBrowser_DocumentComplete Method you add:
>// Get the Document Element
>this.htmlDoc = (HTMLDocumentClass)WebBrowser.Document;
>
>// Get a referrence to the UserName Text Box
>HTMLInputElement txtUserName =
>     (HTMLInputElement)this.htmlDoc.all.item("txtUserName",0);
>txtUserName.value = ConfigurationSettings.AppSettings["UserName"];
>
>// Get a referrence to the Password Text Box
>HTMLInputElement txtPassword = (HTMLInputElement)this.htmlDoc.all.item("txtPassword",0);
>txtPassword.value = ConfigurationSettings.AppSettings["Password"];
>
>// get the html button next
>HTMLInputElement buttonLogin = (HTMLInputElement)this.htmlDoc.all.item("btnSubmit",0);
>
>btnSubmit.click();
>
Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform