How to get a new line in textbox of asp form (VB)

G

Guest

I have trouble to write paragragh with newlines in a multiline textbox
control in ASP.NET form.

I would like to display an instruction in textbox in the web form. But I do
not know how to type in a 'newline' in the text field of the property in
design pane.

Thanks for any help.

David
 
S

S. Justin Gengo

David,

If you're using vb.net add a vbcrlf to your string:

TextBox1.Text = "Here's some text" & VbCrlf & "This is on a new line."

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
G

Guest

Thank you very much.
That is great.

By the way, do you know how to write subscript and superscript, for example,
A^3.

David
 
S

S. Justin Gengo

David,

No, not offhand, but I suspect that you would concatenate the character code
for the subscript or superscript character. Something like:

TextBox1.Text = "This text is 1" & Char([appropriate character code
here]).ToString

But I'm not even certain that a textbox is capable of rendering that... You
may need some type of hybrid textbox in order to do so.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,061
Latest member
KetonaraKeto

Latest Threads

Top