473,408 Members | 2,832 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,408 software developers and data experts.

\u00A0 in VB.NET

Hi -

I'm using VB.NET to build an ASP.NET page with a dropdownlist control. I'm
trying to insert spaces into dropdownlist listitem text values. I read that
it's possible to do so with "\u00A0" to represent a non-breaking space
character. How do you implement such a character in VB.NET?? Or is ther a
different/better approach?

Thanks for your help.

- Jeff
Nov 19 '05 #1
2 3091
You should be able to do it via:
dim spaces as string = DecodedSpaces(2)
lBoxLocation.Items.Add(spaces + dirInfo[i].Name,dirInfo(i).FullName)
public shared function DecodedSpaces(numberOfSpaces as integer) as string
dim spaces as string = ""
for i as integer = 0 to numberofSpaces - 1
spaces &= " "
next
return HttpUtility.HtmlDecode(spaces)
end function

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

"Jeff" <je*********@eNetPortals.com> wrote in message
news:sN***************@newsread3.news.atl.earthlin k.net...
Hi -

I'm using VB.NET to build an ASP.NET page with a dropdownlist control. I'm trying to insert spaces into dropdownlist listitem text values. I read that it's possible to do so with "\u00A0" to represent a non-breaking space
character. How do you implement such a character in VB.NET?? Or is ther a different/better approach?

Thanks for your help.

- Jeff

Nov 19 '05 #2
Thanks, Karl -

That seems to work.

- Jeff
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uS****************@TK2MSFTNGP14.phx.gbl...
You should be able to do it via:
dim spaces as string = DecodedSpaces(2)
lBoxLocation.Items.Add(spaces + dirInfo[i].Name,dirInfo(i).FullName)
public shared function DecodedSpaces(numberOfSpaces as integer) as string
dim spaces as string = ""
for i as integer = 0 to numberofSpaces - 1
spaces &= "&nbsp;"
next
return HttpUtility.HtmlDecode(spaces)
end function

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

"Jeff" <je*********@eNetPortals.com> wrote in message
news:sN***************@newsread3.news.atl.earthlin k.net...
Hi -

I'm using VB.NET to build an ASP.NET page with a dropdownlist control. I'm
trying to insert spaces into dropdownlist listitem text values. I read

that
it's possible to do so with "\u00A0" to represent a non-breaking space
character. How do you implement such a character in VB.NET?? Or is

ther a
different/better approach?

Thanks for your help.

- Jeff


Nov 19 '05 #3

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

Similar topics

7
by: JavaScriptRocks | last post by:
I've been trying to imitate / reverse engineer the add attachment feature in gmail composer. I managed to do it to say about 80% but its giving me trouble in IE on WinXP-Sp2. I am using PHP to do...
2
by: Ed Jay | last post by:
I generate several string in a js. I output the strings to an invisible container using inner.HTML. Then, the container is made visible. For layout purposes, I want to precede some of the strings...
4
by: bboyle18 | last post by:
Hi, I am working with a table sorting script which can be found here http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting This script works very nicely, but when there is a...
3
by: matej | last post by:
I am trying to write new GM script after couple of months of not working with Firefox at all, and I am hitting the wall even with the simplest preliminary steps to it. What I would like to achieve...
2
by: fusillator | last post by:
I would like to create new option with more than one space as text in a select element, is it possible? I tried this statements: var selT=document.getElementById('SelectObj'); selT.add(new...
2
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to...
9
hsriat
by: hsriat | last post by:
I have to toggle the name of a hyperlink from Edit to Save and vice-versa on click event of the same hyperlink. This is the HTML part, <input class="text" id="ix1" type=text></input> <a...
2
by: davidson1 | last post by:
Hai friends..for menu to use in my website..i found in one website....pl look below website.... http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm i downloaded 2 files.... ...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.