You need to post your ASP page, but I'm guessing you didn't properly identify the type of validation you want to do, here is an example (from MSDN):
<asp:rangevalidator id="Range1" xmlns:asp="#unknown">
ControlToValidate="TextBox1"
MinimumValue="1"
MaximumValue="10"
Type="Integer"
EnableClientScript="false"
Text="The value must be from 1 to 10!"
runat="server"/>
</asp:rangevalidator>
Note the "Type" parameter which is set to "Integer", if you have that set incorrectly, you will get an exception.
Full MSDN Example[
^]
[Edit]
To see what part is failing, try this as the first operation in your method:
int textInt1 = Convert.ToInt32(TextBoxLYTNFUG.Text);
int textInt2 = Convert.ToInt32(TextBoxLYTNFUG.Text);
RangeValidatorLYTNFUG.MinimumValue = Convert.ToString(textInt1 - textInt2 * 20 / 100);
But its apparent from the above that the MinimumValue will always be zero (you are subtracting the same value from itself, so that equals zero, zero times anything is zero, and zero divided by 10 is zero).
Anyway, try the above and I think you may find that your text in the textbox isn't being converted properly.
[Edit 2]
Here is what you should do to calculate your min/max values:
int value = ;
RangeValidatorLYTNFUG.MinimumValue = ((int)(Convert.ToInt32(TextBoxLYTNFUG.Text) * 0.8f)).ToString();
RangeValidatorLYTNFUG.MaximumValue = ((int)(Convert.ToInt32(TextBoxLYTNFUG.Text) * 1.2F)).ToString();
Which is much cleaner than what you wrote :)