473,395 Members | 1,986 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,395 software developers and data experts.

Leaving a line c# 2005

21
Hi,
How do I leave a line when inputing into a multi-line textbox.

I would like to add text to the textbox, but on a new line.
In VB you use '\n' i think.
Here is my code:

if(a < 0)
{
txtName.Text = "Hello";

// Want to add a name after the word 'hello', but on a new line

return "N";
}

Thanks.
Mar 8 '07 #1
2 1537
Hi,
How do I leave a line when inputing into a multi-line textbox.

I would like to add text to the textbox, but on a new line.
In VB you use '\n' i think.
Here is my code:

if(a < 0)
{
txtName.Text = "Hello";

// Want to add a name after the word 'hello', but on a new line

return "N";
}

Thanks.
U can add '<br>' tag to do so

Eg:

TxtHello.Text = "Hello <br> Sachin";
Mar 8 '07 #2
Try This


string text = "hello";
text = text + Environment.NewLine;
text = text + "How r u";
Mar 8 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: diablo | last post by:
hi i have seen several examples (blogs in particular) http://www.lastkissed.com/?p=7#comments where placing html into a textarea seems to be stripped out on the other side. and yet retains...
3
by: Dag Sunde | last post by:
Both refreshing (by pressing F5 or otherwise) a page, and navigating away from a page leads to onUnload() triggering. Is it possible to determine if the user is leaving the page for another, or...
8
by: Zvonko | last post by:
Hi! Is it possible to capture an event when user leaves the page and execute some code? Not when he closes the window. Any ideas?
4
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
3
by: Peter J Ross | last post by:
Greetings. I'm quite new to PHP and have very little knowledge of programming in general, so I may be missing something obvious, but I can't find a solution to the following difficulty in either...
2
by: Kevin Blount | last post by:
I have a string of HTML (used for a specific purpose) that I'd like to use somewhere else but as plain text. Rather than introduce a specifically created plain text version I'd like to strip the...
5
by: MLH | last post by:
I use a fair number of debug.print statements. My apps are fairly well 'peppered' with them. I've often wondered if leaving them in the mdb, creating and rolling out an mde intended for use in the...
2
by: johnivey | last post by:
I have a large query that I am trying to debug in query analyzer. However, the errors I get have no line number or reference to where they are failing. How can I find out what line in the query is...
2
by: Eadmund | last post by:
Hi all, Odd question / problem: I'm using a tooltip fom the "Dynamic Drive DHTML code library (www.dynamicdrive.com) - v-cool" - (snipits that are relevant trimed for readability and included...
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
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
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...
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.