Sample
<div class="col-lg-4 col-md-3 @(app.AppPath=="#"?"disableDiv":"")">
Your data
</div>
Programming is fun and interesting. As you all know, sometime we programmers stucks in the middle way of coding without getting a solution. Blogs like this will help us to find a path to solve our problems. The contents of this blog are the solutions that I found by myself and from other sources. Sharing such solutions is also interesting. Thank you!
<div class="col-lg-4 col-md-3 @(app.AppPath=="#"?"disableDiv":"")">
Your data
</div>
<a href="@Url.Action("Index", "Home",new {area="Cpanel"})">
<script type="text/javascript">
$(document).ready(function () {
$('.isFloat').keypress(function(event) {
if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
event.preventDefault();
}
});
});
</script>
<asp:TextBox ID="txtTotlaMark" runat="server" pattern="^[0-9 .]{1,}$" class="isFloat" MaxLength="6" required></asp:TextBox>
<script type="text/javascript">
function isNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
}
</script>
<asp:TextBox ID="txtMobile" pattern="^[0-9+ ]{1,}$" runat="server" CssClass="form-control1" MaxLength="15" onkeypress="return isNumber(event);" required></asp:TextBox>