Solved

How to display multi-space for ListItem of DropDownList

Posted on 2004-08-21
3
217 Views
Last Modified: 2006-11-17
code:

ListItem item;
item.Value = "value";
item.Text = "multi                    space";
dropdownlist1.Items.Add(item);

but,in browser,the 'select' element display 'multi space'.
How shall I do it?
0
Comment
Question by:fjczq
3 Comments
 
LVL 20

Accepted Solution

by:
ihenry earned 50 total points
Comment Utility
try this

string nonBreakingSpaces = new string( ' ', 10 );
nonBreakingSpaces = nonBreakingSpaces.Replace( " ", " " );
ListItem item;
item.Value = "value";
item.Text = "multi" + nonBreakingSpaces + "space";
dropdownlist1.Items.Add(item);


HTH
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now