Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Drop List.Text to include  

Reply
Thread Tools

Drop List.Text to include  

 
 
Tim
Guest
Posts: n/a
 
      04-18-2005
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



 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      04-19-2005
Try this:

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


"Tim" <Tim@NoSpam> wrote in message
news:(E-Mail Removed)...
> 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, "&nbsp;") & "Something"
>
> along with variations using encoding....
>
> However, in the web browser, the & is being replaced with &amp;
>
> Any ideas please?
>
> - Tim
>
>
>



 
Reply With Quote
 
 
 
 
Tim
Guest
Posts: n/a
 
      04-19-2005
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 &nbsp; sequences going through.

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

So, I am no closer...

- Tim




"Scott M." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Try this:
>
> li.Text = Server.HTMLEncode("Item 1 Something")
>
>
> "Tim" <Tim@NoSpam> wrote in message
> news:(E-Mail Removed)...
>> 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, "&nbsp;") & "Something"
>>
>> along with variations using encoding....
>>
>> However, in the web browser, the & is being replaced with &amp;
>>
>> Any ideas please?
>>
>> - Tim
>>
>>
>>

>
>



 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      04-19-2005
Oops! Change "Encode" to "Decode".


"Tim" <Tim@NoSpam> wrote in message
news:(E-Mail Removed)...
> 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 &nbsp; sequences going through.
>
> There is an error in my post below I say strdup(n, "&nbsp;") when it
> should be MyDup(n, "&nbsp; ")
> - MyDup duplicates the string sequence, StrDup seems only to duplicate the
> first character.
>
> So, I am no closer...
>
> - Tim
>
>
>
>
> "Scott M." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Try this:
>>
>> li.Text = Server.HTMLEncode("Item 1 Something")
>>
>>
>> "Tim" <Tim@NoSpam> wrote in message
>> news:(E-Mail Removed)...
>>> 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, "&nbsp;") & "Something"
>>>
>>> along with variations using encoding....
>>>
>>> However, in the web browser, the & is being replaced with &amp;
>>>
>>> Any ideas please?
>>>
>>> - Tim
>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      04-19-2005
No problem. Good luck.


"Tim" <Tim@NoSpam> wrote in message
news:(E-Mail Removed)...
> Excellent! Thank you!
>
> - Tim
>
>
> "Scott M." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Oops! Change "Encode" to "Decode".
>>
>>
>> "Tim" <Tim@NoSpam> wrote in message
>> news:(E-Mail Removed)...
>>> 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 &nbsp; sequences going through.
>>>
>>> There is an error in my post below I say strdup(n, "&nbsp;") when it
>>> should be MyDup(n, "&nbsp; ")
>>> - MyDup duplicates the string sequence, StrDup seems only to duplicate
>>> the first character.
>>>
>>> So, I am no closer...
>>>
>>> - Tim
>>>
>>>
>>>
>>>
>>> "Scott M." <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Try this:
>>>>
>>>> li.Text = Server.HTMLEncode("Item 1 Something")
>>>>
>>>>
>>>> "Tim" <Tim@NoSpam> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> 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, "&nbsp;") & "Something"
>>>>>
>>>>> along with variations using encoding....
>>>>>
>>>>> However, in the web browser, the & is being replaced with &amp;
>>>>>
>>>>> Any ideas please?
>>>>>
>>>>> - Tim
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Tim
Guest
Posts: n/a
 
      04-19-2005
Excellent! Thank you!

- Tim


"Scott M." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Oops! Change "Encode" to "Decode".
>
>
> "Tim" <Tim@NoSpam> wrote in message
> news:(E-Mail Removed)...
>> 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 &nbsp; sequences going through.
>>
>> There is an error in my post below I say strdup(n, "&nbsp;") when it
>> should be MyDup(n, "&nbsp; ")
>> - MyDup duplicates the string sequence, StrDup seems only to duplicate
>> the first character.
>>
>> So, I am no closer...
>>
>> - Tim
>>
>>
>>
>>
>> "Scott M." <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Try this:
>>>
>>> li.Text = Server.HTMLEncode("Item 1 Something")
>>>
>>>
>>> "Tim" <Tim@NoSpam> wrote in message
>>> news:(E-Mail Removed)...
>>>> 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, "&nbsp;") & "Something"
>>>>
>>>> along with variations using encoding....
>>>>
>>>> However, in the web browser, the & is being replaced with &amp;
>>>>
>>>> Any ideas please?
>>>>
>>>> - Tim
>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
#include headers that include this header Aguilar, James C++ 2 07-16-2004 05:56 PM
Re: the use of #include <a_file.h> v/s #include"a_file.cpp" Elie Nader C++ 1 11-28-2003 03:12 PM
Re: the use of #include <a_file.h> v/s #include"a_file.cpp" Rolf Magnus C++ 2 11-28-2003 12:26 PM
#include "bar" negates #include <string> ; how to fix? Danny Anderson C++ 5 08-15-2003 06:38 PM



Advertisments