Paul
|
| Posted: 03/22/2002, 7:44 AM |
|
I am using MySQL with ASP and want each user to have a security code based upon certain criteria, then for the user to be redirected to an appropriate admin page. I have started to construct this but have fallen at the first hurdle, i have a column in my database called UserRights, i have checked this as being the field i want as my security in Properties->Security->Security Field, then i have used the code below to redirect... as seen in Article:
if Session("UserRights")=1 then response.redirect("AdminEducationGrid.asp") else
if Session("UserRights")=2 then response.redirect("AdminSalesGrid.asp") else
if Session("UserRights")=3 then response.redirect("AdminExecutiveGrid.asp")else response.redirect("Stubby.asp")
However I just can't seem to get it to redirect... with me always ending up at the stubby.asp page....
Any ideas? Thanks in advance....
|
|
|
 |
Ken Hardwick
|
| Posted: 03/22/2002, 10:05 AM |
|
Have you tried to convert the session variable to a number...
You might try something like...
cntRedirect = cint(Session("UserRights"))*1
Select case Redirect
Case 1,"1"
strRedirect = "AdminEducationGrid.asp"
Case 2,"2"
strRedirect = "AdminSalesGrid.asp"
Case 3,"3"
strRedirect = "AdminExecutiveGrid.asp"
Case Else
strRedirect = "Stubby.asp"
end select
response.redirect(strRedirect)
|
|
|
 |
|