Skip to content
Advertisement

Tag: asp.net

validate field after setting value via jQuery

I have asp net MVC project. And I have form with few inputs in view. For client side validation I use two libraries: jquery.validate.js and jquery.validate.unbrostive.js For example I have field email: If I press “submit” button with empty field , it shows me an error “Email field required” Ok. If after message has been shown I put value in

Validate ASP.NET Dropdownlist Control with bootstrap Validator

I have a asp dropdownlist <asp:DropDownList ID=”ddIndProvince” data-style=”btn-default” CssClass=”form-control input” runat=”server” AutoPostBack=”True” OnSelectedIndexChanged=”ddIndProvince_SelectedIndexChanged” TabIndex=”8″></asp:DropDownList> On Page load event I inserted “–Select–” item at index 0. Now I am facing problem while I am validating it with bootstrap validator. Its returning valid for “–Select–” item. like below image. How I can validate this.Below us my current script Answer bootstrapValidator is validating

Best way to scrolldown onpageload

I have the following code: The previous code attempts to scroll down after page loading. Is there any problem, as it doesn’t work for me? Answer instead of window.onload use because window.onload is fired when entire page load and document.ready is fired when DOM loads and use srcollTo instead of scroll

JQuery.css(“display”) = “block” not working

I wanted to show and hide my TextBox based on value selected in RadiobuttonList. I wrote the following code for that Though I had achieved my task by using JQuery.show() and JQuery.hide() but was not satisfied as I wanted to know why first approach failed. Second is I used $(“#<%= rbtnIsPFEnabled.ClientID %>”) in above code, can I reduce it to

Get ‘Nan’ when auto calculate

I am creating a form using Gridview in ASP.NET. When the user fills in Qty and Price it needs to automatically calculate the Total. However, my Total always returns Nan (Not a number). What am I doing wrong? The ASP page looks like this: The JavaScript: Answer why are you using isNan and parseInt at the same time ? i

Advertisement