Closed Thread
Results 1 to 4 of 4

Thread: c# app login information (connecting to a site)

  1. #1
    jackyjack is offline Newbie
    Join Date
    Feb 2007
    Posts
    4
    Rep Power
    0

    c# app login information (connecting to a site)

    Hello,

    I'm trying to learn a Visual C# 2005 Express here (which in theory seems to be a easy anough app). But i need to one some things:

    How to write a login code to a Windows Application? The concept looks following:

    you insert a TextBox 1 - there you type your username
    you insert a TextBox 2 - you type your password
    you insert Button - it checks the validation

    --

    basically the site works this way:

    http://www.somesite.com/login.php?us...hing&act=login

    --

    also i would like to know what should i code to get an "interval" thing - what i mean by that is if the user validates personal information with the app then the app will browse the site user accounts itself during some time. Like in every 5 seconds it will refresh and go to another page of that site

    So you insert a TextBox and user writes down the number how often program should refresh the page or browse for another page on that site....

    the thing i need is only a code for interval


    THANKS A LOT FOR HELPING ME OUT! (my english isn't the best.)

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Void's Avatar
    Void is offline Programming Expert
    Join Date
    Jun 2006
    Posts
    410
    Rep Power
    23
    You are writting Web code using C# or is this a document? The link above does not work.
    Void

  4. #3
    jackyjack is offline Newbie
    Join Date
    Feb 2007
    Posts
    4
    Rep Power
    0
    Hello,

    Yes, that was just an example URL; but the original site's login authentication works the same way:

    login.php?username=youruser&password=yourpass&act= login

    I want to write a Windows Application in C# (with Visual 2005 Express) in where you put TextBox 1 for username, TextBox 2 for pass and button (Login) to authenticate in the website. So you login to the website through my written program, basically.

    The thing is i don't know how to write such a code - i've been researching for it pretty long, but haven't found any useful information.

    --

    So, i'd like some help.

    Thank you very much,

    Hardi

  5. #4
    Jordan Guest
    You will use the HttpWebRequest, you need to set the Method property to "POST" or "GET", which will indicate that you are posting data. Also, you will have to call GetRequestStream, and write to the stream the content of the forms data.

    You will need to set the ContentType property to
    "application/x-www-form-urlencoded".

    Also, you will need to find the names of the variables (name1 and name2 below are the names):

    name1=value1&name2=value2

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. JS script tries to convert my site to site full ajax
    By pierrehs in forum JavaScript and CSS
    Replies: 2
    Last Post: 09-22-2011, 09:12 AM
  2. Need a Login Area and Dashboard for Writing Site
    By adrianneizaguirre in forum Services for Buy/Sell/Trade
    Replies: 1
    Last Post: 02-03-2011, 01:09 PM
  3. Replies: 14
    Last Post: 09-16-2010, 12:11 PM
  4. Connecting to a VPN
    By BigLinux in forum Linux Networking
    Replies: 6
    Last Post: 07-09-2009, 12:33 PM
  5. Connecting to MySQL without DSN
    By dirkfirst in forum Managed C++
    Replies: 8
    Last Post: 10-07-2006, 07:58 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts