Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > server.HTMLEncode

Reply
Thread Tools

server.HTMLEncode

 
 
abcd
Guest
Posts: n/a
 
      06-08-2005
Simple but not working at this moment

I have to fill the HTML select control....

my values could be for example "test number 1"

sample code,

dim x
Data = "test number 1"

I am using

<Select>
<option value="<%Response.Write server.HTMLEncode(Data)%>"><%Response.Write
server.HTMLEncode(Data)%></option>
</Select>

as a result I can not see the longer black space between 2 words....I guess
HTMLEncode is not emitting &nbsp

any solution

thanks


 
Reply With Quote
 
 
 
 
abcd
Guest
Posts: n/a
 
      06-08-2005
DO you mean drop down list doesn not display &nbsp;


Curt_C [MVP] wrote:
> Its because of the control you are using... its rendering the &nbsp;
>
>
> "abcd" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Simple but not working at this moment
>>
>> I have to fill the HTML select control....
>>
>> my values could be for example "test number 1"
>>
>> sample code,
>>
>> dim x
>> Data = "test number 1"
>>
>> I am using
>>
>> <Select>
>> <option value="<%Response.Write
>> server.HTMLEncode(Data)%>"><%Response.Write
>> server.HTMLEncode(Data)%></option>
>> </Select>
>>
>> as a result I can not see the longer black space between 2 words....I
>> guess HTMLEncode is not emitting &nbsp
>>
>> any solution
>>
>> thanks



 
Reply With Quote
 
 
 
 
Bob Lehmann
Guest
Posts: n/a
 
      06-08-2005
Server.HtmlEncode does not encode spaces. You will need to use the Replace
function to change spaces to &nbsp;.

Bob Lehmann

"abcd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> DO you mean drop down list doesn not display &nbsp;
>
>
> Curt_C [MVP] wrote:
> > Its because of the control you are using... its rendering the &nbsp;
> >
> >
> > "abcd" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Simple but not working at this moment
> >>
> >> I have to fill the HTML select control....
> >>
> >> my values could be for example "test number 1"
> >>
> >> sample code,
> >>
> >> dim x
> >> Data = "test number 1"
> >>
> >> I am using
> >>
> >> <Select>
> >> <option value="<%Response.Write
> >> server.HTMLEncode(Data)%>"><%Response.Write
> >> server.HTMLEncode(Data)%></option>
> >> </Select>
> >>
> >> as a result I can not see the longer black space between 2 words....I
> >> guess HTMLEncode is not emitting &nbsp
> >>
> >> any solution
> >>
> >> thanks

>
>



 
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




Advertisments