For Each oGroup In oUser.Groups
Select Case(oGroup.Name)
Case "InpdapNAXX"
'Response.write("InpdapNAXX")
Response.Redirect("./default.html")
Case "Group B"
'response.write("Yay")
Response.Redirect("A.asp")
Case "Group C"
'response.Redirect("Z.asp")
Case "Group D"
'Response.redirect("Y.asp")
End Select
Next
%>
</body>
</html>
</form>
ANSWER: Hi,
If you do a response.write for Request.ServerVariables("LOGON_USER") you should find the username looks something like this:-
domainname\username
You will need to remove everything before the \
Try that and let me know if you need any more help.
---------- FOLLOW-UP ----------
QUESTION: Hi friend how to "You will need to remove everything before the \"...
Answer Hi,
Try this
<%
if Request.ServerVariables("LOGON_USER") = "" then
ntusername = ""
else
ntusername = Request.ServerVariables("LOGON_USER")
if instr(ntusername,"\") <> 0 then
intLen = len(ntusername) - (instr(ntusername,"\") + 1)
ntusername = Right(ntusername, intLen + 1)
ntusername = lcase(ntusername)
end if
end if
response.write ntusername
%>