PC Review


Reply
Thread Tools Rate Thread

Adding a tab character to a drop down

 
 
=?Utf-8?B?R3dlblA=?=
Guest
Posts: n/a
 
      26th Sep 2007
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
 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      26th Sep 2007
"GwenP" <(E-Mail Removed)> wrote in message
news:77A596BC-68B4-4DC8-AB5D-(E-Mail Removed)...

> 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

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      26th Sep 2007
On Sep 26, 4:16 pm, GwenP <Gw...@discussions.microsoft.com> wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Break column with Drop Cap character kendevil Microsoft Word Document Management 2 14th Aug 2009 02:22 PM
Drop Down Lists: Allow option of adding own data if not in drop do ruperthouse Microsoft Excel Worksheet Functions 8 21st Jul 2009 07:29 PM
I need to drop the first and last character of each field entry.. =?Utf-8?B?U3RlcGhhbmll?= Microsoft Access Macros 2 6th May 2005 07:11 PM
Drop down list excepting more then the first character in the lis. =?Utf-8?B?R3JlZ2gtYXBn?= Microsoft Access Forms 0 12th Jan 2005 02:43 PM
Drop down list excepting more then the first character in the lis. =?Utf-8?B?R3JlZ2gtYXBn?= Microsoft Access Database Table Design 0 11th Jan 2005 09:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:52 AM.