Replace " " with the html character's space

Results 1 to 2 of 2

Thread: Replace " " with the html character's space

  1. #1
    Join Date
    Dec 1969

    Default Replace " " with the html character's space

    Hi,<BR>I have to replace " " with the html character&#039;s space in a datacolumn&#039;s datagrid on an aspx page, so i can see the spaces at the begin of a string result of a query. <BR>When i can do that? In which event of the DataGrid? <BR>Thank you. <BR>Alessandro Rossi

  2. #2

    Default RE: Replace

    You can hook up the item_dataBound or item_created events.<BR><BR>It might be cleaner to change to a template column and use a function in the databinding expression.<BR><BR>&#060;%#ConvertSpaceToNbsp(Data Binder.Eval(Container.DataItem,"FieldName"))%&#062 ;<BR><BR>Where ConvertSpaceToNbsp is function in your code-behind or use YourUtility.ConvertSpaceToNbsp if you put the logic in a helper of somekind

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts