locked
Login??? RRS feed

  • Question

  • User595945745 posted

    i have three pages asp.net (c#)

    (1) Login Page (2) MainMenu1 (have three rows)   (3) MainMenu2 

    i also have pre existing sql database name "mydatabase" have three tables 

    (1) Student (2) Teacher   (3) Admin

    Login page contain 2 textboxes (  textbox1 for username,  textbox2 for password) and login button

    i also have three type of users (student,teacher,admin).i want when login button is pressed then check (match) username and password in three tables (Student ,Teacher ,Admin)

    *if user is Student then page MainMenu1 is open & first two row of table is disable

    *if user is Teacher then page MainMenu1 is open

    *if user is Admin then page MainMenu2 is open

    i need complete code of login & event perform code

    plzzzzzz help me?????

    Thursday, June 5, 2014 2:39 PM

Answers

  • User1140095199 posted

    Hi,

    i have three pages asp.net (c#)

    (1) Login Page (2) MainMenu1 (have three rows)   (3) MainMenu2 

    i also have pre existing sql database name "mydatabase" have three tables 

    (1) Student (2) Teacher   (3) Admin

    Login page contain 2 textboxes (  textbox1 for username,  textbox2 for password) and login button

    i also have three type of users (student,teacher,admin).i want when login button is pressed then check (match) username and password in three tables (Student ,Teacher ,Admin)

    *if user is Student then page MainMenu1 is open & first two row of table is disable

    *if user is Teacher then page MainMenu1 is open

    *if user is Admin then page MainMenu2 is open

    i need complete code of login & event perform code

    Your tables are too spread out better use single table for Login. Store all the Login information in a single table.

    You may also consider using Login controls that provides inbuild Authentication facilities in asp.net using Membership class.

    Refer to the following:

    http://www.c-sharpcorner.com/uploadfile/raj1979/login-control-in-Asp-Net-3-5/

    http://msdn.microsoft.com/en-us/library/vstudio/ms178339(v=vs.100).aspx

    For enabling and disabling Menu based on authentication refer to the following:

    http://www.c-sharpcorner.com/UploadFile/dacca2/enable-disable-sitemap-menu-item-based-on-role-in-Asp-Net/

    Kindly do some research and make some progress. Then you may POST some code here if you face some difficulties.

    Thank You for posting your issue in ASP.NET Forum.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, June 14, 2014 1:52 AM

All replies

  • User-760709272 posted

    We can't give you the code when we don't know what technology you're using for authentication, we don't know your table structures, we don't know what technology you're using to connect to the database, we don't know what your menus are, how they are implemented or anything.  This question kind of seems like you're looking for someone to do your coursework for you which isn't really what this forum is for.  If you have a specific question about some specific problem then someone can probably help, but we're not here to do other people's work.  Consult your course tutor if you need help getting started.

    Thursday, June 5, 2014 3:06 PM
  • User1140095199 posted

    Hi,

    i have three pages asp.net (c#)

    (1) Login Page (2) MainMenu1 (have three rows)   (3) MainMenu2 

    i also have pre existing sql database name "mydatabase" have three tables 

    (1) Student (2) Teacher   (3) Admin

    Login page contain 2 textboxes (  textbox1 for username,  textbox2 for password) and login button

    i also have three type of users (student,teacher,admin).i want when login button is pressed then check (match) username and password in three tables (Student ,Teacher ,Admin)

    *if user is Student then page MainMenu1 is open & first two row of table is disable

    *if user is Teacher then page MainMenu1 is open

    *if user is Admin then page MainMenu2 is open

    i need complete code of login & event perform code

    Your tables are too spread out better use single table for Login. Store all the Login information in a single table.

    You may also consider using Login controls that provides inbuild Authentication facilities in asp.net using Membership class.

    Refer to the following:

    http://www.c-sharpcorner.com/uploadfile/raj1979/login-control-in-Asp-Net-3-5/

    http://msdn.microsoft.com/en-us/library/vstudio/ms178339(v=vs.100).aspx

    For enabling and disabling Menu based on authentication refer to the following:

    http://www.c-sharpcorner.com/UploadFile/dacca2/enable-disable-sitemap-menu-item-based-on-role-in-Asp-Net/

    Kindly do some research and make some progress. Then you may POST some code here if you face some difficulties.

    Thank You for posting your issue in ASP.NET Forum.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, June 14, 2014 1:52 AM