Welcome to my ASP Code Website

UCase ASP String Function



UCase is a commonly used ASP function that allows you to convert all characters in a string to their upper case versions. It only takes in one parameter:

* The string variable to operate on

The original string variable is not altered.

Let's say you have a form in which a user types in a model number. You then want to compare that model number against a database of models to get more information. You have millions of model numbers, so you don't want to do a drop down or something like that. But if the user starts typing in lowercase letters, say "xyg142" or "Xyg142", you will have trouble doing a search properly. So you use:

ModelNo = UCase(ModelNo)

That would turn both of the above examples into "XYG142" without the user having to think about which way they enter the information.



Still stuck? Please be sure to Contact Lisa Shea - that's me - and I'm happy to lend a hand. I've been programming in ASP classic for many, many years and can help you get through your coding challenge quickly and easily!

To have an easy to use, easy to read reference on hand as you code, also check out my Intro to ASP Book which comes in both ebook and paperback format.

Thanks for stopping in to my page - and good luck!

ASP String Functions