I need to get the username from windows. This is the code that I have that is giving it to me
var username = Request.ServerVariables("LOGON_USER");
var temp = new Array();
temp = username.split('\\');
username=temp(1);
It returns domain/username. However when it gets to line 3 I get the following error:
Microsoft JScript runtime error '800a01b6'
Object doesn't support this property or method
I need to get just the username. How do I do this?
Thanks.