Awesome ASP.net Core and MVC Controls
Form inputs
Checkbox
Ochk checkbox mod in this demo is set globally when application starts, so we are turning it off using Ochk(false) to show the basic checkbox
FormInput/Index.cshtml
<div class="efield">
<label>@Html.Awe().CheckBox("chk1").Ochk(false).Value(true) <span class="o-con">Checkbox</span></label>
</div>
<div class="efield">
<label>@Html.Awe().CheckBox("chk2").Ochk(false).Enabled(false).Value(true) <span class="o-con">Disabled</span></label>
</div>
Ochk
FormInput/Index.cshtml
<div class="efield">
<label>@Html.Awe().CheckBox("chk3").Value(true) <span class="o-con">Checkbox</span></label>
</div>
<div class="efield">
<label>@Html.Awe().CheckBox("chk4").Enabled(false).Value(true) <span class="o-con">Disabled</span></label>
</div>
<div class="efield">
<label>@Html.Awe().CheckBox("chk5").Enabled(false) <span class="o-con">Disabled</span></label>
</div>
Otoggl
FormInput/Index.cshtml
<div class="efield">
<label>@Html.Awe().CheckBox("chk6").Otoggl().Value(true) <span class="o-con">Checkbox</span></label>
</div>
<div class="efield">
<label>@Html.Awe().CheckBox("chk7").Otoggl().Enabled(false).Value(true) <span class="o-con">Disabled</span></label>
</div>
<div class="efield">
<label>@Html.Awe().CheckBox("chk8").Otoggl().Enabled(false) <span class="o-con">Disabled</span></label>
</div>
<div class="efield">
<label>
@Html.Awe().CheckBox("chk9").Otoggl(o => o.Width("7em").Yes("Enabled").No("Disabled")).Value(true)
<span class="o-con">with width, yes and no set</span>
</label>
</div>
<div class="efield">
<button type="button" class="awe-btn" onclick="toggleAll()">toggle enabled</button>
</div>
<script>
function toggleEnable(c) {
var o = c.data('o');
o.api.enable(!o.enb);
}
function toggleAll() {
toggleEnable($('#chk6'));
toggleEnable($('#chk7'));
toggleEnable($('#chk8'));
toggleEnable($('#chk9'));
}
</script>
Button
FormInput/Index.cshtml
@Html.Awe().Button().Text("button")
@Html.Awe().Button().Text("primary").CssClass("awe-btnp")
@Html.Awe().Button().Text("disabled").Enabled(false)
Comments