Form Authenication
-
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
-
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
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