473,883 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("pc ode")%>><%= rstT.fields("pc ode") & vbTab &
rstT.fields("pd esc") </option>

<option value=<%= rstT.fields("pc ode")%>><%= rstT.fields("pc ode") & <Tab&
rstT.fields("pd esc") </option>

<option value=<%= rstT.fields("pc ode")%>><%= rstT.fields("pc ode") & "vbTab"
& rstT.fields("pd esc") </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 2162
"GwenP" <Gw***@discussi ons.microsoft.c omwrote in message
news:77******** *************** ***********@mic rosoft.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...@discussi ons.microsoft.c omwrote:
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("pc ode")%>><%= rstT.fields("pc ode") & vbTab &
rstT.fields("pd esc") </option>

<option value=<%= rstT.fields("pc ode")%>><%= rstT.fields("pc ode") & <Tab&
rstT.fields("pd esc") </option>

<option value=<%= rstT.fields("pc ode")%>><%= rstT.fields("pc ode") & "vbTab"
& rstT.fields("pd esc") </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
1365
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 select is not in the list then they click on a button and they get a new window with a list with 100s of items (taken from a database)and they select an item from this list. I want to close the window and then ammend there selection to the smaller...
2
2042
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() method so that the viewstate to works properly. What if I want to let the user select what control to display? For instance say I have a drop down list of user controls and want to load the control the user has selected? When the user selects a control...
1
1236
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 autopostback property so that I can do some validations on the server. This page has algo one html button which opens a new window by using a javascript function to display some calculations. I have to close this new window every time that a post...
5
10314
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 = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Temp\BOND.xls;" & _ "Extended Properties=""Excel 8.0;HDR=YES;""" Dim oCn As New OleDbConnection(strConn)
1
2732
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 drop down list is set to AutoPostBack, and for OnSelectedIndexChanged should update the values of other drop down lists. This page works fine in VS 2003, and the other pages with similar controls are posting back fine in 2005. Has anyone else...
3
2003
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 drop down list to the update panel. The update panel is then added to a table cell, I then create another drop down list, and add it to the update panel, the table cell is then added to the row, the row to the table.
4
9092
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 down list and then another image. I want to align the images so that they are in the middle of the row so to speak, ie, not at the top. As the updatePanel simply renders a DIV tag I figured that I would be able to do something like:
4
3975
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 add_class page looks like: <body> ADD CLASS<br> Class Title: <input type="text" value="class_title"><br> Class Name: <input type="text" value="class_name">(Must be Unique)<br> <input type="checkbox" name="children" value="children">Children's...
4
2770
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 add the value selected in the drop down list and the text box values and put it into the listbox? After adding to the listbox, the selected value needs to stay in the drop down menu and not get removed. Thanks in advance
0
9799
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10868
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9588
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7137
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3242
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.