PDA

View Full Version : Trimming session value in ASP


rico1931
06-10-2008, 01:25 PM
Hi there folks. I was wondering if there is a way to "trim" the session value in ASP. I know that "trim" takes the spaces but what I want is to shorten the actual txt. For Example I have a Session.MM_Username. This session return the users email address because I am using this as there username for when they log in. Is is possible to only return the characters before the "@" symbol? Username when log in could be abc@abc.com, when they log in I want the user to see "Welcome abc" not "Welcome abc@abc.com"

Thanks for your help!

davidj
06-10-2008, 02:59 PM
temp = "henry@address.com"

arrayMail=Split(temp,"@",-1,1)
x=arrayMail(0)


x now contains henry