I am building a string of last names separated by hyphens. Sometimes a whitespace gets caught in there. I need to remove all whitespace from end result.
Sample strin
Why use Regex when you can simply use the Trim() method
Text='<%# Eval("FieldDescription").ToString().Trim() %>'
OR
string test = "Testing "; test.Trim();