Awesome ASP.net Core and MVC Controls

Form inputs

Checkbox

Ochk checkbox mod in this demo is set globally in Application_Start 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("disabled").Enabled(false)



Comments

We use cookies to improve your online experience. By accessing this site, you agree to the use of cookies and other technologies to process your personal data (e.g. IP address) to enhance and personalise your experience across our websites. Additionally, third-party companies, may store cookies on your device and use similar technologies to collect and use certain information. For more information, refer to our privacy policy and cookie policy.