Custom CheckBoxList.DataTextFormatString

J

james

Does anyone know how to use the String.Replace in
CheckBoxList.DataTextFormatString ?

I tried: {0}.Replace(" ", " ")
but that obviously doesnt work.

Any Ideas?

Thanks!
James
 
G

Guest

James

I see what you're trying to do but it does not work like this. Format string
describes how the value should be inserted and formated, and it's not
interpreted as script (which you're trying to achive). Replace spaces with
before binding the data.

Hope this helps
 
J

james

Milo do you know how to do this with a custom formatter? I plan on
using this format on many databound items and would prefer to not make
an intermediate class for databinding each time.

-James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top