Space after values

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Cedric
User
Posts: 3

Space after values

Post by Cedric »

everytime i have a value in the code on a page it automatically places a space behind the value it get out of the database which i dont want because i want to place a comma after the value i have looked but i cant find a solution to the problem. has anyone had this same problem as me and solved it or found a solution


MichaelG
User
Posts: 1110

Post by MichaelG »

You can use the Row_Rendered server event to trim the spaces. For example:

Field.ViewValue = ConvertToString(Field.CurrentValue).Trim(); // Trim spaces for ViewValue
Field.EditValue = ConvertToString(Field.CurrentValue).Trim(); // Trim spaces for EditValue

w.saeed
User
Posts: 7

Post by w.saeed »

Hi

If you use Ms. SQL DB, you should put Database Filed type as Varchar instead of Char.


Post Reply