Click here to Skip to main content
15,921,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody,

I have a little question:
I'm working on a program that should work with a site, but in order to get to the page I need to enter username and password on a login page.
Can someone tell me how I should implement this?
I know the address of the page, the one that requires the password, but I don't know how to get to the next page (the one after that with password [the redirected page]). All I need is the source of the page.
If someone have any suggestion it would be very helpful.

Thank you all.
Posted
Updated 27-Jul-11 9:07am
v2

If the page is meant to be accessed by an application, it probably supports basic html authorization. You should investigate the HttpWebRequest Class.
 
Share this answer
 
Comments
Christian Graus 27-Jul-11 15:20pm    
And the corollary, if it's not meant to be, then it will be complex to side step that.
Seems to me like the obvious path is to host a web brwoser control and use the DOM to populate the username/password, and press the login button.
 
Share this answer
 
You supply the username and password of course. How are you trying to use this? What type of application? ANd, do you own the page in question? This sounds very suspicious.
 
Share this answer
 
Comments
asaffff496818 27-Jul-11 1:23am    
Look, assume that you want to get the source code of your page in facebook or something, you should enter user name and password somewhere in the code to get refference to this page, my question is what should I do to get the source.
hope that I'm clear now.
Thank you.
asaffff496818 27-Jul-11 1:25am    
By the way I'm using C# as a language.
[no name] 27-Jul-11 6:54am    
You want to get the source of a Facebook page? Navigate to the page and use your browser's context menu to view the html source.

This still seems a dubious request.

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