Problems splitting a string using non breaking space as a token

I am trying to split a string that is made up of three substrings
seperated by non-breaking spaces.  In fact the string was
created from the attached code snippet i.e. from the concatenation of three database fields
and replacing all spaces with non-breaking spaces.

On the firing of a certain event I am attempting to break up the string
into its substrings using the following code:

Dim values() As String = Split(EMPLIST.SelectedValue, Chr(160), 3)

The first substring (values(0)) comes out correct but the second is invariably an empty string and the third is a concatenation of the last two substrings that I intended to separate.

Anybody sees why I am not getting my three substrings?
SELECT Replace(LEFT(RTRIM(FIRST_NAME) + '                  ', 10) + LEFT(RTRIM(LAST_NAME) + '                    ', 10) + CAST(SSN AS char(10)), ' ', Char(160)) AS column1 FROM EMPLOYEE where DISTRICT = '" + Request.QueryString("district")

Open in new window

sib_userAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sib_userAuthor Commented:
This works:
Dim values() As String = EMPLIST.SelectedValue.Split(Convert.ToString(Chr(160)).ToCharArray, StringSplitOptions.RemoveEmptyEntries)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.