Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Login Validation

Login Validation

Scheduled Pinned Locked Moved ASP.NET
csharpdatabaseasp-netregexhelp
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kiran01
    wrote on last edited by
    #1

    Hi All , I am working with Asp.net 2.0 C# and my database is SQl 2005 .I hve a problem with putting Login Validation . I want tht when user enters username and Password it should be verified with database if ID PWD matches then user should be logged in and if it doesn't match then it should give login failed . Can u plz pass on d code if possible . Thanks in advance

    I 1 Reply Last reply
    0
    • K kiran01

      Hi All , I am working with Asp.net 2.0 C# and my database is SQl 2005 .I hve a problem with putting Login Validation . I want tht when user enters username and Password it should be verified with database if ID PWD matches then user should be logged in and if it doesn't match then it should give login failed . Can u plz pass on d code if possible . Thanks in advance

      I Offline
      I Offline
      Imran Khan Pathan
      wrote on last edited by
      #2

      1. Write sql query string to get ID of user and fill dataset if username and password wont be matched it returns value 0.If ID is 0 give msg that Login Failed otherwise it successed. 2. U can also check that if ds.rows.count==0 return false for login failed otherwise true. Best Regards Pathan

      K 1 Reply Last reply
      0
      • I Imran Khan Pathan

        1. Write sql query string to get ID of user and fill dataset if username and password wont be matched it returns value 0.If ID is 0 give msg that Login Failed otherwise it successed. 2. U can also check that if ds.rows.count==0 return false for login failed otherwise true. Best Regards Pathan

        K Offline
        K Offline
        kiran01
        wrote on last edited by
        #3

        I have given this code WebForm1

        Login:

        Password:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups