title: How to use FormsAuthentication with logins stored in SQL Server DB table?
body: <p>I am making a new web application in ASP.NET (in C#) using FormsAuthentication for the login. A standard FormsAuthentication setup is in place currently, with usernames and passwords specified in the web.config as usual, and this setup is working great. However,</p>
  
  <p>I would like to link this login setup to an SQL Server table in the database. This table stores user account information for each user, including username and password. Basically, I would like to find a way so that the following line of code will look for a username and password in this DB table, rather than in the web.config as it normally does:</p>
  
  <p>FormsAuthentication.Authenticate(txt_username.Text, txt_password.Text);</p>
  
  <p>But I'm at a loss as to how to do this exactly.
  I've been reading about Membership.ValidateUser, but I still cannot find how to use that to link to the usernames and passwords in the users table in the database.</p>
  
  <p>Any help will be highly appreciated! 
  (Btw, this is my first post, so please feel free to point out any noob mistakes I may have made).</p>