kwilliams
06-02-2004, 05:19 PM
Hello,
I'm new to ASP & VBScript, and I'm trying to do something that should be pretty simple. On our intranet site, I'm pulling the NT login, comparing it to a DB value, and showing the user any records that match their Username. In doing this, I need to use a Substring method to pull all characters after 10 characters as the Username. This is what I have so far:
<%
strLogin = Request.ServerVariables("LOGON_USER")
strUsername = strLogin.Substring(strLogin,10,50)%>
...but this isn't pulling my NT login value as it would with ASP & JavaScript.
For example, if my full login with domain was SERVERNAME\kwilliams, I would want to pull everything after the "\". How can I do this easily with using VBScript? Am I missing something in my code? Thanks for any input.
KWilliams
I'm new to ASP & VBScript, and I'm trying to do something that should be pretty simple. On our intranet site, I'm pulling the NT login, comparing it to a DB value, and showing the user any records that match their Username. In doing this, I need to use a Substring method to pull all characters after 10 characters as the Username. This is what I have so far:
<%
strLogin = Request.ServerVariables("LOGON_USER")
strUsername = strLogin.Substring(strLogin,10,50)%>
...but this isn't pulling my NT login value as it would with ASP & JavaScript.
For example, if my full login with domain was SERVERNAME\kwilliams, I would want to pull everything after the "\". How can I do this easily with using VBScript? Am I missing something in my code? Thanks for any input.
KWilliams