Create login for web site

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • meydanshahi
    New Member
    • May 2010
    • 5

    Create login for web site

    I want to create a login in my website. I have 2 textbox one for importing the username and the other one for importing the password and I have a button for sign in.

    How can we create a login when the signin button is clicked? I want to write my codes with session.
    Last edited by Niheel; May 13 '10, 07:14 PM. Reason: spelling, grammar, punctuation, please read guidelines on how to ask question on Bytes
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    try it ... yourself... its pretty simple....

    Don't ask for codes out here.... we are here to help you out if you're stuck, not code for you

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      There are several different types of authentication and authorization techniques that you can use to "login" a user.

      The oldest way to do would be to create a Class that represents the user.
      When the user clicks the login button you would retrieve the user-name and password provided, authenticate this against some data store (like a database or something) and if the user authenticates, store the user class in Session and redirect the user to the next page of your web application. Using this technique requires that you check to make sure that the class is stored in session in each page of your website...if there is nothing in session then redirect the user back to the log in page.


      Now there are several different, more modern and advanced ways to do this. One of the most popular ones is to use Forms Authentication.
      See the following links for more information about using Forms Authentication with Role Membership.

      You could also use Windows Authentication to authenticate the user. This method is typically used for intranet (as apposed to Internet) applications the most. Although sometimes it's used for Internet applications... .if you are curious about this method then research it :)

      I think that should be enough to get you going.

      -Frinny

      Comment

      • meydanshahi
        New Member
        • May 2010
        • 5

        #4
        Originally posted by Frinavale
        There are several different types of authentication and authorization techniques that you can use to "login" a user.

        The oldest way to do would be to create a Class that represents the user.
        When the user clicks the login button you would retrieve the user-name and password provided, authenticate this against some data store (like a database or something) and if the user authenticates, store the user class in Session and redirect the user to the next page of your web application. Using this technique requires that you check to make sure that the class is stored in session in each page of your website...if there is nothing in session then redirect the user back to the log in page.


        Now there are several different, more modern and advanced ways to do this that. One of the most popular ones is to use Forms Authentication.
        See the following links for more information about using Forms Authentication with Role Membership.

        You could also use Windows Authentication to authenticate the user. This method is used for intranet (as apposed to Internet) applications the most....if you are curious about this method then research it :)

        I think that should be enough to get you going.

        -Frinny
        thanks! your answers are really helpful.

        Comment

        Working...