469,927 Members | 1,382 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Adding a tab character to a drop down

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
Sep 26 '07 #1
2 2047
"GwenP" <Gw***@discussions.microsoft.comwrote in message
news:77**********************************@microsof t.com...
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...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 26 '07 #2
On Sep 26, 4:16 pm, GwenP <Gw...@discussions.microsoft.comwrote:
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...10/23/255.aspx

Sep 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sam Kuehn | last post: by
1 post views Thread by Cesar | last post: by
3 posts views Thread by Rob Meade | last post: by
4 posts views Thread by Rob Meade | last post: by
4 posts views Thread by ranjini ns | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.