Make sure first letter is uppercase

Make sure first letter is uppercase

am 12.07.2007 18:31:56 von middletree

I want to take a value that users type into a field (actually 2
fields--first and last name) and convert the first letter to Upper Case. I
htought I could use UCase, but it seems to only work for an entire string.
Anyone got a suggestion?

Re: Make sure first letter is uppercase

am 12.07.2007 22:50:28 von exjxw.hannivoort

Middletree wrote on 12 jul 2007 in
microsoft.public.inetserver.asp.general:

> I want to take a value that users type into a field (actually 2
> fields--first and last name) and convert the first letter to Upper
> Case. I htought I could use UCase, but it seems to only work for an
> entire string. Anyone got a suggestion?

t = request.form("myField")
t = ucase(left(t,1)) & mid(t,2)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: Make sure first letter is uppercase

am 13.07.2007 15:34:43 von middletree

Works! Thanks!

Re: Make sure first letter is uppercase

am 13.07.2007 16:12:48 von exjxw.hannivoort

Middletree wrote on 13 jul 2007 in microsoft.public.inetserver.asp.general:

> Works! Thanks!

Please next time, quote. Usenet is not email!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: Make sure first letter is uppercase

am 13.07.2007 17:27:26 von middletree

> Middletree wrote on 13 jul 2007 in
> microsoft.public.inetserver.asp.general:
>
>> Works! Thanks!
>
> Please next time, quote. Usenet is not email!

And Microsoft forums are not Usenet.

I hate quoting because I am a staunch believer in top-posting, and when I
quote, I get "corrected" by those who hate top-posting. They always remind
me that top-posting is against the rules of etiquitte. In fact, most people
I know prefer to read a top-posted message, but because we weren't around
newsgroups in 1989 when those rules were formulated, we don't get any say.

But I bottom-posted here for you because I really appreciate your help. I
had never heard of "mid" before. Thanks.

Re: Make sure first letter is uppercase

am 13.07.2007 17:36:46 von exjxw.hannivoort

Middletree wrote on 13 jul 2007 in
microsoft.public.inetserver.asp.general:

>> Middletree wrote on 13 jul 2007 in
>> microsoft.public.inetserver.asp.general:
>>
>>> Works! Thanks!
>>
>> Please next time, quote. Usenet is not email!
>
> And Microsoft forums are not Usenet.

Any NG that is on usenet is part of usenet.

> I hate quoting because I am a staunch believer in top-posting, and
> when I quote, I get "corrected" by those who hate top-posting. They
> always remind me that top-posting is against the rules of etiquitte.
> In fact, most people I know prefer to read a top-posted message, but
> because we weren't around newsgroups in 1989 when those rules were
> formulated, we don't get any say.
>
> But I bottom-posted here for you because I really appreciate your
> help. I had never heard of "mid" before. Thanks.

OK.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)