473,402 Members | 2,050 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,402 software developers and data experts.

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

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
Nov 19 '05 #1
4 6089
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
"david" <da***@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
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

Nov 19 '05 #2
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. Justin Gengo" wrote:
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
"david" <da***@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
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


Nov 19 '05 #3
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
"david" <da***@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
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. Justin Gengo" wrote:
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
"david" <da***@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
>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


Nov 19 '05 #4
Environment.Newline

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jonas | last post by:
I want the user to be able to write like http://www.google.com in one textBox and Google in an other textBox. Than I want the user to press a button when done. The text will then be past like...
10
by: Deano | last post by:
I think that just about sums it up. Is there a fix/workaround for this?It's quite annoying behaviour and not user-friendly.thanksMartin
1
by: VMI | last post by:
In my Windows app, if I'm in a multi-line textbox and I'm writing a postal address (ie. write ist line and press <Enter>, write 2nd line and press <Enter>, etc...) how can I make sure that the...
1
by: Paul M. Frazier, Ph.D. | last post by:
I am writing a user information update page and I populate the form on Page_Load with the current values of the user's name, etc. When I change the text in one of the textbox controls (e.g.,...
1
by: Martin | last post by:
Dear Group Sorry for bothering you again but I need expert advice on this. I have placed a HTML textbox on my aspx form and converted it to run as a server control. At some point in my code I...
13
by: Miguel Dias Moura | last post by:
Hello, i want to display the image "icon-yes.gif" if a certain condition is true or the image "icon-no.gif" if it's false. I have this line: <td><img runat="server" src='<%# "..image/" &...
11
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
10
by: Jane Sharpe | last post by:
Hi, I have a textbox with the words "Enter your name here" inserted as default text - At the moment, to remove this the user must highlight all the text and delete before they type in their name...
10
by: aarepasky | last post by:
I am using ASP Web 2005 express. I created the user control below and I am listing the html code. I have 2 textboxes. One is txtCompanyName. The main page has 2 panels on it and a button. ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...

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.