G
Guest
I am building up the validation expression for a RegularExpresionValidator
control by retreiving some values from a database and looping through the
DataTable to build and adding lots of | characters. Basically i want to
build up a string along the lines of ^102|103|104|105$ where the number are
coming from the data table. This is easy enough and works fine.
Unfortunately the data values from the database are padded out with loads of
spaces at the end which builds a string like ^102 |103 |104
|104 |$ which doesn't seem to work for the validation expression.
How do i remove the extraneus white space from the end of data before adding
it to the string variable. Bearing in mind that the data in the database is
not always the same length.
control by retreiving some values from a database and looping through the
DataTable to build and adding lots of | characters. Basically i want to
build up a string along the lines of ^102|103|104|105$ where the number are
coming from the data table. This is easy enough and works fine.
Unfortunately the data values from the database are padded out with loads of
spaces at the end which builds a string like ^102 |103 |104
|104 |$ which doesn't seem to work for the validation expression.
How do i remove the extraneus white space from the end of data before adding
it to the string variable. Bearing in mind that the data in the database is
not always the same length.