Below is some code where I execute a query on a column and it returns all the necessary values which I then bind to a drop down list as both the text values and actual values. But right before I bind these value I need to Trim() all of them to get rid of whitespace. Does anyone know how to alter the data that is about to be bound right before i bind it?
Code:
OleDbCmd.CommandText = "SELECT DISTINCT client_id FROM CoreProcessRange"
cConnection.Open()
lstClientid.DataSource = OleDbCmd.ExecuteReader()
lstClientid.DataTextField = "client_id"
lstClientid.DataValueField = "client_id"
lstClientid.DataBind()