Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
Event registration app with QR/Paypal
Home
Friday, September 19, 2014
How to display Textbox input to upper case in ASP.NET MVC razor view?
1. Create css class
.uppercase
{
text-transform: uppercase;
}
2. Add this class into Textbox in razor view
@Html.TextBoxFor(model => model.PostCode, new { @class = "uppercase" })
Note: the value still keeps original value.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment