Drop List.Text to include  

T

Tim

Hi,

I am trying to load up a drop list with semi aligned columns like so:

[Item 1 Something]
Item 2 Something Else

etc.

To do so, I have tried to fill the Text valus of ListItems like so:

dim li as new ListItem

li.Text = "Item 1" & StrDup(14, " ") & "Something"

along with variations using encoding....

However, in the web browser, the & is being replaced with &

Any ideas please?

- Tim
 
T

Tim

Thanks Scott, but unfortunately this isn't working.
This in code:
Server.HTMLEncode("Item 1 Something")
yields this in the web browser html source
"Item 1 Something"
which appears as
"Item 1 Something"

- the multiple spaces just "compress". I don't seem to be able to get the
necessary   sequences going through.

There is an error in my post below I say strdup(n, " ") when it should
be MyDup(n, "  ")
- MyDup duplicates the string sequence, StrDup seems only to duplicate the
first character.

So, I am no closer...

- Tim




Scott M. said:
Try this:

li.Text = Server.HTMLEncode("Item 1 Something")


Tim said:
Hi,

I am trying to load up a drop list with semi aligned columns like so:

[Item 1 Something]
Item 2 Something Else

etc.

To do so, I have tried to fill the Text valus of ListItems like so:

dim li as new ListItem

li.Text = "Item 1" & StrDup(14, " ") & "Something"

along with variations using encoding....

However, in the web browser, the & is being replaced with &

Any ideas please?

- Tim
 
S

Scott M.

Oops! Change "Encode" to "Decode".


Tim said:
Thanks Scott, but unfortunately this isn't working.
This in code:
Server.HTMLEncode("Item 1 Something")
yields this in the web browser html source
"Item 1 Something"
which appears as
"Item 1 Something"

- the multiple spaces just "compress". I don't seem to be able to get the
necessary   sequences going through.

There is an error in my post below I say strdup(n, " ") when it
should be MyDup(n, "  ")
- MyDup duplicates the string sequence, StrDup seems only to duplicate the
first character.

So, I am no closer...

- Tim




Scott M. said:
Try this:

li.Text = Server.HTMLEncode("Item 1 Something")


Tim said:
Hi,

I am trying to load up a drop list with semi aligned columns like so:

[Item 1 Something]
Item 2 Something Else

etc.

To do so, I have tried to fill the Text valus of ListItems like so:

dim li as new ListItem

li.Text = "Item 1" & StrDup(14, " ") & "Something"

along with variations using encoding....

However, in the web browser, the & is being replaced with &

Any ideas please?

- Tim
 
S

Scott M.

No problem. Good luck.


Tim said:
Excellent! Thank you!

- Tim


Scott M. said:
Oops! Change "Encode" to "Decode".


Tim said:
Thanks Scott, but unfortunately this isn't working.
This in code:
Server.HTMLEncode("Item 1 Something")
yields this in the web browser html source
"Item 1 Something"
which appears as
"Item 1 Something"

- the multiple spaces just "compress". I don't seem to be able to get
the necessary   sequences going through.

There is an error in my post below I say strdup(n, " ") when it
should be MyDup(n, "  ")
- MyDup duplicates the string sequence, StrDup seems only to duplicate
the first character.

So, I am no closer...

- Tim




Try this:

li.Text = Server.HTMLEncode("Item 1 Something")


Hi,

I am trying to load up a drop list with semi aligned columns like so:

[Item 1 Something]
Item 2 Something Else

etc.

To do so, I have tried to fill the Text valus of ListItems like so:

dim li as new ListItem

li.Text = "Item 1" & StrDup(14, " ") & "Something"

along with variations using encoding....

However, in the web browser, the & is being replaced with &

Any ideas please?

- Tim
 
T

Tim

Excellent! Thank you!

- Tim


Scott M. said:
Oops! Change "Encode" to "Decode".


Tim said:
Thanks Scott, but unfortunately this isn't working.
This in code:
Server.HTMLEncode("Item 1 Something")
yields this in the web browser html source
"Item 1 Something"
which appears as
"Item 1 Something"

- the multiple spaces just "compress". I don't seem to be able to get the
necessary   sequences going through.

There is an error in my post below I say strdup(n, " ") when it
should be MyDup(n, "  ")
- MyDup duplicates the string sequence, StrDup seems only to duplicate
the first character.

So, I am no closer...

- Tim




Scott M. said:
Try this:

li.Text = Server.HTMLEncode("Item 1 Something")


Hi,

I am trying to load up a drop list with semi aligned columns like so:

[Item 1 Something]
Item 2 Something Else

etc.

To do so, I have tried to fill the Text valus of ListItems like so:

dim li as new ListItem

li.Text = "Item 1" & StrDup(14, " ") & "Something"

along with variations using encoding....

However, in the web browser, the & is being replaced with &

Any ideas please?

- Tim
 

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,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top