Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

What is the textual representation of a TAB

Hi there

I have Option Explicit ON, Option Strict On, and the reference to VB6 has been removed. How do I enter a vbTab in string.


Thanks in advance
0
comt00006
Asked:
comt00006
  • 6
  • 6
1 Solution
 
mmarinovCommented:
i don't know if there is some representation of vbTab but you can use
  more then one times to create tabs

B..M
0
 
Vaishali_chaudhryCommented:
try using "\t"
0
 
comt00006Author Commented:
Hi there

thanks for the response.

I am coding ASP.NET in VB so the   will not work. Isn't that html coding?

As for the "\t", I tried adding it like so:

strMyString = "Hi there" & "\t" & "Me name is Comatoast"

and the "\t" is represented as a string not an ascii character.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mmarinovCommented:
comt00006,

  is the string for a white space in the html
so to represent
This is Experts    Exchange
you have to use
"This is Experts    Exchange"

B..M
0
 
comt00006Author Commented:
Hey that almost sounded like a good idea.

I just tried it and the output was

"This is Experts    Exchange"

the   were represented as strings.
0
 
mmarinovCommented:
do you encode the output ?
B..M
0
 
comt00006Author Commented:
What do you mean by encode the outpu?
0
 
mmarinovCommented:
how do you try this? because i've tried this
Response.Write("This is Experts    Exchange");
and it write on the screen exactly what i've told you

B..M
0
 
comt00006Author Commented:
I am trying to put text within a ListBox control.

You cannot use the Response object. I just tried it and my code goes like this:

lstMine.Items.Add(Response.Write("Hi there" & "   " & "Comatoast"))

This is an error without even compilling because the ListBox expects a string and does not recognize the Response.Write as a string.

Thanks though.
0
 
mmarinovCommented:
yes, it will cause an error
actually in listboxcontrol ( wich is rendered as html select ) i thinkg that you CAN NOT add tabs
the browse just trim the white spaces

B..M
0
 
comt00006Author Commented:
Thanks a million mmarinov.

What about a textBox. Is there a way to output tabs?
0
 
mmarinovCommented:
in the textbox if you type "Experts       Exchange" it will render like this
so if you work with code behind just write

Dim tab as string = "    "; '4 white spaces
TextBox.Text = "Experts" + tab + "Exchange"

B..M
0
 
comt00006Author Commented:
Thanks a million
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now