Click here to Skip to main content
12,348,925 members (67,902 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
I want to open website login using windows form application.
Posted 30-May-12 22:22pm
Comments
Richard MacCutchan 31-May-12 4:26am
   
And what is your problem?
sanjeevjinfotel 31-May-12 4:31am
   
i want to create application that will automatically login my attandence website.
Richard MacCutchan 31-May-12 4:44am
   
I understand that, but you have not said which part of it you are having problems with.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

You are talking about website automation. If your windows forms has a web browser control in it you could do website actions (i.e. button clicks, read textboxes) quite easily.

Here is a good reference site for more detail:
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/23dfc3f9-3274-4929-8dc5-9ba543f4911d[^]
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Create a Windows Application

Add WebBrowser Control
Write Code to Navigate Site
public bool isrun;
        private void Form1_Load(object sender, EventArgs e)
        {
            webBrowser1.Url = new Uri("http://www.yourwebsite.com");
        }

after this add a event DocumentCompleted
which occurs where page completely loaded

        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
        if(!isrun)
        {
            webBrowser1.Document.GetElementById("login_name").InnerText = "uid";
            webBrowser1.Document.GetElementById("passwd").InnerText = "pwd";
            webBrowser1.Document.GetElementById("buttonid_login").InvokeMember("click");      
           isrun=true;
        }
 
}
  Permalink  
Comments
sanjeevbaadsah 31-May-12 4:58am
   
thanks a lot.:):)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

You should use Web Browser Control In Windows Application
Thanks
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 31 May 2012
Copyright © CodeProject, 1999-2016
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