Character casing in Asp.net

We might used the "Charactercasing" property of Textbox in C# windows applications. This is used to get the input values as upper or lower case without doing the separate coding. But in web applications,this property is not available directly. But we need to achieve this functionality using CSS.

In CSS, we need to use the "text-transform" property to make the input text as upper, lower or initcaps.

Here is the CSS sample:

.makeuppercase
{
text-transform:uppercase;
}
.makelowercase
{
text-transform:lowercase;
}
.makeinitcaps
{
text-transform:capitalize;
}

Need to assign the style name to TextBox "CssClass" property as;

TextBox1.CssClass = "makeuppercase"

The above code will make the input values to upper case while entering the values.

Comments

Popular posts from this blog

Storing Images in MySQL database

XML Documentation comments

DataTable ExtendedProperties