473,388 Members | 1,277 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Custom CheckBoxList.DataTextFormatString

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

Oct 30 '06 #1
2 4981
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
--
Milosz Skalecki
MCAD
"james" wrote:
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

Oct 30 '06 #2
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
Milosz Skalecki wrote:
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
--
Milosz Skalecki
MCAD
"james" wrote:
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
Oct 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Itai | last post by:
I am attempting to create an ASP.NET Custom Validator javascript for a checkboxlist control. My goal is to limit the total number of selections to be 1 - 5 at most. My problem is that I get a null...
4
by: Shaul Feldman | last post by:
Hello, I have something really awkward at work - fighting with CheckBoxList... How can I define CSS for ListItem in CheckBoxList programmatically. I add CheckBoxList's Items on the fly, something...
3
by: Matthias S. | last post by:
Hi there, I have a typesafe collection in my application called Countries, which is derived from the ReadOnlyCollectionBase. As you might guess, the item-value is of type Country. Each Country...
4
by: Patrick.O.Ige | last post by:
I have a CheckBoxList in a DataList and i'm trying to get item Selected after doing a postBack. I have set my CheckBoxlist AutoPostBack="True" Any ideas what 'm doing wrong? It seems not to...
4
by: oshiko | last post by:
Hi All, Below is my SQL Statement, Select Text, Value, Status from Tables I want to mark as a checked when the Status is true, how do I achieve this during databinding? Thank you very...
0
by: webmaster | last post by:
Hi all, I'm tearing my hair out with this one. I have successfully implemented by own RadioButtonList in order to provide additional functionality and a DIV rather than TABLE-based layout in...
3
by: cannontrodder | last post by:
I am displaying names and other details of my users in a Formview control by binding my custom business object to it. My custom object also has a property that is a collection of boolean values and...
6
by: Nathan Sokalski | last post by:
I am creating a BulletedList and would like to use a - as the bullet. However, I could not find a way to do this using the properties for the BulletedList control. Is there a way to use a specific...
3
by: dancer | last post by:
Using VB2005 and Asp.net I have a CheckBoxList. One of the items needs to be user-defined. Is it possible to put a text box WITHIN a CheckBoxlist? Meaning - if the user checks "Other" he...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.