macupryk Posted November 4, 2005 Posted November 4, 2005 I need to remove the prefix(domain name) if exist in front of a username from a session variable. paramsql.Value = Session("ssNtUser") say the domain is za username is macupryk I would like to remove the za\ so in the session variable I have macupryk only but the domain name can change. Also there might not even be a domain name with a slash. Thanks. Quote
Nate Bross Posted November 4, 2005 Posted November 4, 2005 If Me.Text.IndexOf("\\") Then MessageBox.Show(Me.Text.Split("\\")(1)) Else MessageBox.Show(Me.Text) End If Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.