Login page(database connection) using class concept
C# programming using object oriented concept:
Step 1 :- Create a table which contains three columns id,username and password
Step 2 :- Create an operation class which contains database connection codes
Step 3 :- Create a container class which contains get and set method for each variable
Step 4 :- Create a provider class and in that provider class the object for operation class is created.It contains the code to retrieve data from database and also specify the stored procedure.Here “sel_login” is the stored procedure to select data from database.And the stored procedure is
ALTER PROCEDURE sel_login(@username varchar(50),@password varchar(50))
AS
select * from candlogin where username=@username and password=@password
RETURN
Step 5 :- Create an asp page and design a login page
Step 6 :- Create object for provider class and container class and write the code in login link button event