TextBox

The TextBox is used to enter plain text, it has many options like clear button, format function, etc. You could also change its type to use it as a password input or a native date input.

Textbox with clear button



Using custom format:



Disabled

Password input

Native date and time editors

Native Color Picker


TextBoxDemo/Index.cshtml
Simple textbox:<br />
@(Html.Awe().TextBox(new TextBoxOpt { Name = "Name", Placeholder = "type here...", ClearBtn = true }))
<br />
<br />
Using custom format:<br />
@(Html.Awe().TextBox(new TextBoxOpt { Name = "Exp", Value = "the actual value", FormatFunc = "valFunc" }))
<br />
<br />
Disabled:<br />
@(Html.Awe().TextBox(new TextBoxOpt { Name = "disbl", Enabled = false, Value = "abc" }))

<script>
function valFunc(val) {
return "secret";
}
</script>



Comments