I am using a compare validator with the following code:
private void CheckRom()
{
if (romCheck.Checked == true && romFromText.Text != null &&
romToText.Text != null)
{
romCompare.Enabled = true;
romCompare.ControlToCompare = romFromText.Text;
romCompare.ControlToValidate = romToText.Text;
if (int.Parse(romToText.Text) < int.Parse(romFromText.Text))
{
romCompare.ErrorMessage = "The Tp amount must be greater than the From
amount!";
}
romCompare.Visible = true;
}
However, when running the program. it goes through the code and just goes
on to the next step without showing the validator or stopping until the
problem is corrected. What am I doing wrong?
Thanks,
Dave
--
Message posted via http://www.dotnetmonster.com