473,657 Members | 2,537 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Textbox Carriage Return

Using ASP.Net and VB.net

I have textboxes (<asp:textbox id......>) in which the user will be entering
paragraphs.
They are multiline (several rows and several columns).
The carriage returns that the user puts in (return/enter key) do not show up
when the data is retrieved. It is one long line.
Is there any way to make the user's paragraph divisions show up in the
report?

May 17 '07 #1
2 17016
Keep in mind, the text they are typing is plain ASCII text. It includes
line-breaks but they're ASCII text linebreaks. That means when you retrieve
them and display them in a web page it's meaningless because they aren't
HTML line breaks. You just need to do a Replace() on the text string and
replace the carriage return linefeed with a <br /element. I believe in
VB.Net this is a vbCrLf for both a carriage return and linefeed. Pass this
to the replace as Replace(vbCrLf, "<br />")
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"dancer" <da****@microso ft.comwrote in message
news:u5******** ******@TK2MSFTN GP02.phx.gbl...
Using ASP.Net and VB.net

I have textboxes (<asp:textbox id......>) in which the user will be
entering paragraphs.
They are multiline (several rows and several columns).
The carriage returns that the user puts in (return/enter key) do not show
up when the data is retrieved. It is one long line.
Is there any way to make the user's paragraph divisions show up in the
report?

May 17 '07 #2
YEA!!! It works!
Thank you.
"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:uc******** ******@TK2MSFTN GP06.phx.gbl...
Keep in mind, the text they are typing is plain ASCII text. It includes
line-breaks but they're ASCII text linebreaks. That means when you
retrieve them and display them in a web page it's meaningless because they
aren't HTML line breaks. You just need to do a Replace() on the text
string and replace the carriage return linefeed with a <br /element. I
believe in VB.Net this is a vbCrLf for both a carriage return and
linefeed. Pass this to the replace as Replace(vbCrLf, "<br />")
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"dancer" <da****@microso ft.comwrote in message
news:u5******** ******@TK2MSFTN GP02.phx.gbl...
>Using ASP.Net and VB.net

I have textboxes (<asp:textbox id......>) in which the user will be
entering paragraphs.
They are multiline (several rows and several columns).
The carriage returns that the user puts in (return/enter key) do not show
up when the data is retrieved. It is one long line.
Is there any way to make the user's paragraph divisions show up in the
report?


May 17 '07 #3

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

Similar topics

5
49708
by: aw | last post by:
Hi MVP's, I have a VB expression that inserts text in a report's textbox: (code in report's On-Active) If not isnull(forms!myform!subject1) then TextBox = "John Doe" End If
5
1690
by: Paddy | last post by:
I am reading a file like so: using(FileStream inStream = new FileStream ("addresses",FileMode.Open,FileAccess.Read)) { } One of the strings is long and is displayed in a multil;ine textbox.
1
2189
by: VMI | last post by:
If I want to separate a string in a web textbox so that it takes several lines, how can do it? In a Windows textbox, I only needed to add the "\r\n" to the string for the carriage return. Apparently it's not the same with the web textbox. Thanks.
3
2266
by: Simon Middlemiss | last post by:
I have a multiline textbox which I would like populated in the following manner. "Line1 Line2 Line3 Line4" etc. I know how to do it in code, but is there a way to do it in the design view?
1
2266
by: fd123456 | last post by:
The TextBoxes in ASP have a weird behaviour when it comes to handling carriage returns. You can try this : Create a Webform. On it, place a textbox, set it's TextMode property to MultiLine. Place a button. Double-click on the button and in it's event handler, just type : TextBox1.Text = TextBox1.Text ;
22
4497
by: DraguVaso | last post by:
Hi, For my application I need the following behavior: When I press F4 the cursor has to move to the next line in my multiline textbox which begins with "0". Finding lines starting with 0 isn't that difficult, but to find the next line is more difficult. For exemple: if my cursor is on line 200, it has to start searching on line 201, and not on line 1. Anybody has any ideas?
10
3477
by: Neil | last post by:
Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be separated by a hard return. For example, say I have the following 4 RTB controls in my form: RTB1 = "abcd" RTB2 = "efgh" RTB3 = "ijkl" RTB4 = "mnop"
3
4538
by: HockeyFan | last post by:
I've done this before by trapping keydown and checking for a CR, and then clicking a particular button based on which textbox the event happened. However, I was wondering if there's a simpler way to trap a carriage return in a textbox, and have it click a button?
7
12652
by: satyabhaskar | last post by:
hi all, In my web page i have 3 text boxes and one submit button...Actually my problem is how do i focus on 2nd text box upon (pressing enter key)carriage return press in the first text box after entering some text in first text box... Thanks in advance,
0
8385
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8723
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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
8602
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
4150
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
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.