rangevalidator

Remove "$" before ASP.Net RangeValidator script executes.

How can I force the input's onchange script to run before the RangeValidator's script? I want to prevent a failed validation when the user enters a dollar sign or comma. function cleanUp(str) { re = /^\$|,/g; return str.replace(re, ""); // remove "$" and "," } <input type="text" id="salary" runat="server" onchange="this.value=clea...

asp:RangeValidator on DateTime with format dd/MMM/yyyy

Hi, Is it possible to use the ASP.Net Range validator when the format string is dd/MMM/yyyy? Kind regards, ...

Using RangeValidator with byte

This is the property declaration in question: [RangeValidator(1,RangeBoundaryType.Inclusive,255,RangeBoundaryType.Inclusive,MessageTemplate = "StartFlexibility is out of range")] public byte StartFlexibility { get; set; } When the validate method is called, a FormatException is thrown telling me that the value type needs to be In...

c# Use two validators on the same field

Hello, I have run into a problem trying to modify a form I myself have not built. The form has a asp:input field for a date value, wich is checked by a requiredFieldVal and a rangeVal. The rangeVal has type set to "date" and min value 2000-01-01: max value 3000-01-01 Now to the problem, I'm trying to add so that the user also can input...

ASP.net range validator moving to next page

I have put a range validator in a asp.net text box control in my webpage; whenever the range is not meeting ; it will dispay the error message, But it is moving to the next page. how i can prevent it from moving to the next page after the click of submit button while the range not met?? ...

Using aspnet range validator on html input control

Hello all, I am building a small web application in c#. I am using the range validator and I want to bind it to an html control that has the runat="server" attribute to it. From some reason it won't bind and won't perform any check for the content of the control. Does any of you have an idea what to do? ...

Can I get the ASP.NET RangeValidator an onblur/onfocus events to play nice with each other?

I have a textbox for entering a currency amount, with a RangeValidator control making sure the value entered is between 1 and 99999999.99. The field also has an “onblur” event that fires off some JavaScript to format the input with commas and a decimal point (e.g. 12455 -> 12,455.00). There's also a "onfocus" event that reverses the "on...

Set the Culture for an asp.net RangeValidator

An asp:RangeValidator takes it's culture info from the page/ thread and all advice online around getting the right culture seems to be to set the CultureInfo on the thread. Rick Strahl's west wind blog is typical advice However, due to problems running the server code in this way, we are stripping out the code we were using previously ...

ASP.NET RangeValidator can't do even the most basic math !?!?!?

I'm having an issue with my ASP.NET RangeValidator controls. I want to allow users to enter a discount amount, and this amount must be negative (< $0.00). I want to verify that the amount entered in a textbox is a negative value, so I have this in my page markup: <asp:TextBox ID="tbxDiscount" runat="server" /> <asp:RangeValidator ID="r...