can be like that:
assuming your user table:
create table USER (USERNAME nvarchar(10), PASSWD nvarchar(10), int USERGROUP)
void AuthenticateUser(string username, string pwd) {
var q = from u in MyContext.USERs
where u.USERNAME==username && u.PASSWD==passwd
select u.USERGROUP;
var usergroup = q.FirstOrDefault();
if(usergroup == null)
Page.Redirect("NotFound");
switch(usergroup) {
case 1:
Page.Redirect("usergroup1_page");
break;
case 2:
Page.Redirect("usergroup2_page");
break;
default:
Page.Redirect("error_page");
break;
}
}
Please note that I didn't test this code. I hope the idea is clear.