Limit the length of a string using DataTextFormatString
Posted on 2006-11-13
I am binding a dropdown box to a datareader, I would like to limit the length of the strings because if the string is grater than 25 CHR then it starts to push my formatting on my page around
Manufacturers.DataSource = ManuReader
Manufacturers.DataTextField = "SupplierName"
Manufacturers.DataTextFormatString = HERE IS THE PROBLEM
I know I can loop through the datareader and use left(STRING,25) but I would like to know if I can use DataTextFormatString