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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Form Authenication

Form Authenication

Scheduled Pinned Locked Moved ASP.NET
databasequestionworkspace
2 Posts 2 Posters 0 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.
  • H Offline
    H Offline
    hahii
    wrote on last edited by
    #1

    Hi, I have a web config file configuration> But in web config file you are using some data for user name and password but what I need pass a database in which I stored usernames and passwords. I have no idea how can I check weather users and passwords matches with columns UserName and Password in my table. Table name is tbUsers. I have connection String

    V 1 Reply Last reply
    0
    • H hahii

      Hi, I have a web config file configuration> But in web config file you are using some data for user name and password but what I need pass a database in which I stored usernames and passwords. I have no idea how can I check weather users and passwords matches with columns UserName and Password in my table. Table name is tbUsers. I have connection String

      V Offline
      V Offline
      Venk259
      wrote on last edited by
      #2

      Solution is for .net 2.0 Add these lines to the web.config the authorization is used to prevent the anonymous user. in this example my default url is text2.aspx page In login page write the following code in the button click event if (ValidateUser()) { FormsAuthentication.RedirectFromLoginPage(txtuserName.Text, false); } ValidateUser() is user-defined function where you will write the code to check whether the password given my user matches with the password available in the database. In other page's nothing is needing to write for validation

      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