entering login button in asp.net

Posted by Vivekjj under ASP.NET on 11/1/2012 | Points: 10 | Views : 1117 | Status : [Member] | Replies : 6
Hi I have two login controls in my page such as staff login and students login if i have entered staff user name and password and press enter button means its go to staff home page but if i enter students username and password after i have press the enter button means its not going to student home page its showing message enter the staff username ....




Responses

Posted by: Saratvaddilli on: 11/1/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
use validation group then it will works

Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Vivekjj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vivekjj on: 11/1/2012 [Member] Starter | Points: 25

Up
0
Down
i have done validation but yet its not working

Vivekjj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Saratvaddilli on: 11/1/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
post your code

Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Vivekjj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gopesh9 on: 11/2/2012 [Member] Starter | Points: 25

Up
0
Down
Hey,

Just check credentials and according to that redirect the user in there respective home page.
For Example: Attach a role in the along with the user, that is student or staff, now when the user logs in according to that role redirect him to respective page.

G. S.
.Net Developer

Vivekjj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nkkppp on: 11/4/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Just use two Validation groups one for Staff and other for Student. It will work fine because both the validations work independently using Validation Group.

Regards,
Prathap.

Vivekjj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Seng2hs on: 11/5/2012 [Member] Starter | Points: 25

Up
0
Down
You have different javascript validation function, call the respective javascript function when login button click.

After doing the validation, check for the role is "Staff or Student" and redirect accordingly

Vivekjj, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response