Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a microsoft webbrowser control in an MFC dialog based application. I need to log in automatically to a website without entering the username and password in the site but in code.

Please help.
Posted
Updated 27-Dec-12 22:14pm
v2

If you are trying to enter credentials that are not seen by the user, I would suggest creating a small webbrowser window (ie. 1 X 1 pixel) and enter the login info there, then (before closing this window) open a second properly sized window to the site's page of interest. After this second window is open, close the first.
 
Share this answer
 
Comments
Member 8919952 3-Jan-13 1:00am    
Thanks for the reply :)
Actually I want to skip the login page. I want to navigate directly to the page which comes after clicking the login button.
Is it possible to pass the login details through the code, so that I can directly see the second page, and whenever I run the application I need not to enter the login credentials.
Thanks for the reply :)
Actually I want to skip the login page. I want to navigate to the page which comes after clicking the login button.
Is it possible to pass the login details through the code, so that I can directly see the second page?
 
Share this answer
 
Comments
H.Brydon 3-Jan-13 1:16am    
The answer to that depends on how the webpage is written. There is no universal answer. Have a look at the web page source (ie. on the server; not the html or client side javascript that is generated). Needless to say, if it allows you to pass credentials in the url, you need to think about security issues.
Member 8919952 3-Jan-13 1:38am    
Sorry I think I am unable to explain it properly.
I don't want to access the database or the server source. I simply want to pass the credentials to the username and password fields, and want to click the login button(through code), which means I am accessing the client side only not the server side. The rest of the process would be same as if I had entered the credentials manually in the login page. I don't think there is any security breach or something related to security.
In very simple terms I want to access some fields of any web page through code which I access manually without code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900