Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC VC++
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 27-Dec-12 19:43pm
Edited 27-Dec-12 22:14pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Member 8919952 at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thanks for the reply Smile | :)
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?
  Permalink  
Comments
H.Brydon at 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 at 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)

  Print Answers RSS
0 Gihan Liyanage 332
1 Sergey Alexandrovich Kryukov 250
2 ClimerChinna 222
3 vikinghunter 188
4 OriginalGriff 161
0 Sergey Alexandrovich Kryukov 8,373
1 OriginalGriff 7,112
2 CPallini 2,598
3 Richard MacCutchan 2,025
4 Abhinav S 1,788


Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100