Left function in ASP

L

Luiz Horacio

Hi,

I want to use the two first numbers of a user-input as a flag, but don't
know how to get them in ASP... How can I use a function like 'variable =
left(user_input, 2)' in ASP?


Regards,
 
D

dlbjr

intFlag = GetFlag(user_input)
If intFlag > 0 Then
'Do What Ever
End If

Function GetFlag(strData)
GetFlag = 0
strData = Left(Trim(strData),2)
If IsNumeric(strData) Then
GetFlag = strData
End If
End Function

-dlbjr
Discerning resolutions for the alms
 
S

Steven Burn

string = Left$(user_string, 2)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,356
Latest member
Tommyhotly

Latest Threads

Top