Adding a tab character to a drop down

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there

Anyone know the syntax in ASP that shows 2 values in a drop down combo with
a tab between them

I have tried:

<option value=<%= rstT.fields("pcode")%>><%= rstT.fields("pcode") & vbTab &
rstT.fields("pdesc") </option>

<option value=<%= rstT.fields("pcode")%>><%= rstT.fields("pcode") & <Tab> &
rstT.fields("pdesc") </option>

<option value=<%= rstT.fields("pcode")%>><%= rstT.fields("pcode") & "vbTab"
& rstT.fields("pdesc") </option>

I can't seem to find the correct syntax anywhere.

I want the results to read...with the descriptions lined up

1 Corporate
10 Corporate & Commercial

but am getting ...

1 Corporate
10 Corporate & Commercial

Thanks
GwenP
 
Anyone know the syntax in ASP that shows 2 values in a drop down combo
with
a tab between them

One of the most important things to remember about ASP.NET (or any similar
technology) is that, no matter how clever it is, when all is said and done,
its fundamental job is to stream HTML down to a client browser in response
to a request from that client browser...

Generally speaking, the tab character is completely ignored by HTML
rendering engines, and will be treated simply as white space, so there is no
point in rendering a tab character to be streamed to the client browser - it
will simply be ignored...

Pretty much your only option with something like this is to use non-breaking
space characters i.e. &nbsp; - of course, you'll have to calculate how many
you need, and remember that non-proportionally-spaced fonts are always going
to mess these things up a little bit...
 
Hi there

Anyone know the syntax in ASP that shows 2 values in a drop down combo with
a tab between them

I have tried:

<option value=<%= rstT.fields("pcode")%>><%= rstT.fields("pcode") & vbTab &
rstT.fields("pdesc") </option>

<option value=<%= rstT.fields("pcode")%>><%= rstT.fields("pcode") & <Tab> &
rstT.fields("pdesc") </option>

<option value=<%= rstT.fields("pcode")%>><%= rstT.fields("pcode") & "vbTab"
& rstT.fields("pdesc") </option>

I can't seem to find the correct syntax anywhere.

I want the results to read...with the descriptions lined up

1 Corporate
10 Corporate & Commercial

but am getting ...

1 Corporate
10 Corporate & Commercial

Thanks
GwenP

Look at the following post, hope it helps
http://blogs.madtechnology.net/blogs/chris/archive/2003/10/23/255.aspx
 
Back
Top