I'm new to C # / .net I'm trying to create a login page which is on one page of the site Instructions to the administrator and to all other users, I have successfully added the required pages through aspnet_regsql.exe, I am able to obtain data from the database and allowed user and folder via ASP.NET configuration back and website Created. When I created a user, I checked the SQL Server database and it is working but when I try not to do anything then nothing happens. I did some research and I realized that I need to add code to take this method to the right page, but I do not know where it starts.
Protected Zero Logon 1_Attetric (Object Sender, AuthenticateEventArgs E) Edit: Thanks for the input on the redirect, how do you accept login with the database Are you I am using standard controls that go with login controls.
Firstly you must authenticate the user and then you redirect that user to the page that Available to him.
If (authentication success) {// If you want to parse the user's user ID on the page, you can use query string // like "~ / home.page ? Id = 129 "Answer Redirect ("~ / Home.page")} If you use a custom data table, you can write a procedure to authenticate the user, Use the data table to capture the members and I agree using a SQL process, as shown below:
Create process [DBO]. [Authentication] (@ Email Interaction (50), @ Password Interpretation (50)) As Set on @@ ID ID @@ ID = Must present (select ID from e-mail = @ AML) if present ([Dbo]]. Select [user] where email = @ Email and [password] = @ password) is correct as' ISIDID ', ID id as ID ID' Wrong ', 0 as the id return
No comments:
Post a Comment