Comparing strings

Comparing strings

Hi,

I an using the 'Validate on form submit' script to put a value in to a field that is the result of adding two strings together.

The script looks like this..
if (dop.MCC_MNC < oop.MCC_MNC)
{
input.Reference = dop.MCC_MNC + "/" + oop.MCC_MNC;
}
else
{
input.Reference = oop.MCC_MNC + "/" + dop.MCC_MNC;
}

So if the value in dop.MCC_MNC is less than the value in oop.MCC_MNC then the variable will be set to dop.MCC_MNC + "/" + oop.MCC_MNC, and vica versa.

The two strings that are being compared can contain alpha-numeric values, so one might be "AAA" and the other "BBB" and the resulting variable would be "AAA/BBB"

My problem is that I can't get this to work as you can't do a 'less than' compare on these string variables.

Is there a way that I achieve this please?

Thanks,

Lee