473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2149
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: clarket | last post by:
Hi, Is there any easy way of adding an item to a html list (or does this need to be done server side). What I want to do is have a list wirh about 10 items in it, if the item the user wants to...
2
by: Sam Kuehn | last post by:
There has been a lot of articles on how to load user controls at runtime in the Init() method. UserControl myControl = (UserControl)LoadControl(stringControl); I add the control in the Init()...
1
by: Cesar | last post by:
Hello there, I'm facing the following situation: I have an aspx web page which contains several web controls (e.g button and drop down list). The drop down list in particular has enabled the...
5
by: Przemek Wrzesinski | last post by:
Hi, I'm trying to add additional column using 'alter table' command via OleDB to Excel workbook (one sheet called queExportBOND): Dim strConn As String strConn =...
1
by: DCC700 | last post by:
After upgrading a web application from VS 2003 to 2005 there is a page where any control event that should cause a postback instead generates an Invalid character error on the page. For example a...
3
by: Rob Meade | last post by:
...does it matter which order? ie... I create a table/tablerow/tablecell, I then create a new update panel, I create a drop down list, I add list items to the drop down list, I then add the...
4
by: Rob Meade | last post by:
Hi all, Ok - this might sound kinda stupid - but I cant see how to do it... I've got an update panel which contains, on one horizontal line, a drop down list, then an image, then another drop...
4
tolkienarda
by: tolkienarda | last post by:
hi all I am working on a php driven database program for a literacy program, it will allow them to keep track of classes and students, the part i am strugling with is adding new classes, the...
4
by: ranjini ns | last post by:
Hi, I have a form, and in this form, there are 2 drop down list a text box, one button (labelled "add" )and finally, a listbox. The question is, when the user clicks on the add button, how do I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.