2
Use the Nuget package jQuery.Maskedinput.
In the View:
@section scripts {
<script>
$("#OrdemBancaria").mask("9999OB99999");
</script>
}
Usually I use the Bundle thus:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
// Alguns JS aqui
"~/Scripts/jquery.maskedinput.js",
// Mais alguns aqui
));