Vbscript UCase string function provides the functionality to convert the string to uppercase in ASP web pages. Using vbscript UCase function, you can convert the string containing lower case and upper case letters to uppercase completely. Vbscript UCase function keeps the uppercase characters unchanged and converts the lowercase characters to uppercase in the provided string. Assign the string expression value to vbscript variable and pass the variable to vbscript UCase function to get the string in uppercase.
Syntax for ASP Vbscript UCase String Function
UCase( string )
UCase function accepts the string type value or vbscript variable having string type value containing both lowercase and uppercase letters that you want to convert into uppercase completely.
Examples of ASP Vbscript UCase String Function
Example 1:
<%
Dim myString
myString = "UCase String Function"
Response.Write(UCase(myString))
%>
Example 2:
<%
Dim myString
myString = "UCASE STRING FUNCTION"
Response.Write(UCase(myString))
%>
Both above examples of Vbscript UCase string function will return the same output:
UCASE STRING FUNCTION
Vbscript UCase function converts only lowercase letters to uppercase. All other characters such as numeric digits and special characters including punctuation marks remain unchanged. UCase function performs action only on English alphabetical characters.
Click here to learn the ASP Vbscript LCase String Function.