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

Display Memo Text

I have a dataItem that is a text memo field. When I use
<%#container.DataItem('memoText')%>, it displays it with no line breaks.

Is there a function to convert the line breaks on the memo field?

Thanks,
George
Nov 18 '05 #1
2 3425
You'll need to replace line breaks: &vbcrlf
With line break tag <br>

And vice versa when putting the data into a textarea for editing.

Simon.

"Gmansky" <gm*****@starmd.net> wrote in message
news:eO**************@TK2MSFTNGP11.phx.gbl...
I have a dataItem that is a text memo field. When I use
<%#container.DataItem('memoText')%>, it displays it with no line breaks.

Is there a function to convert the line breaks on the memo field?

Thanks,
George

Nov 18 '05 #2
Hi George,

When you display this in a textbox it should display fine. If you use a label you need to convert the line breaks with <br> or <p> tags. Here's a routine that I use for this:
/// <summary>
/// Fixes a plain text field for display as HTML by replacing carriage returns
/// with the appropriate br and p tags for breaks.
/// </summary>
/// <param name="String Text">Input string</param>
/// <returns>Fixed up string</returns>
public static string DisplayMemo(string HtmlText)
{
HtmlText = HtmlText.Replace("\r\n","\r");
HtmlText = HtmlText.Replace("\n","\r");
HtmlText = HtmlText.Replace("\r\r","<p>");
HtmlText = HtmlText.Replace("\r","<br>");
return HtmlText;
}
+++ Rick --
--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web

"Gmansky" <gm*****@starmd.net> wrote in message news:eO**************@TK2MSFTNGP11.phx.gbl...
I have a dataItem that is a text memo field. When I use
<%#container.DataItem('memoText')%>, it displays it with no line breaks.

Is there a function to convert the line breaks on the memo field?

Thanks,
George

Nov 18 '05 #3

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

Similar topics

3
by: Alfredo Agosti | last post by:
Hi folks, I have an Access 2000 db with a memo field. Into the memo field I put text with bold attributes, URL etc etc What I need to to is converting the rich text contained into the memo...
6
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
1
by: Gmansky | last post by:
I have a dataItem that is a text memo field. When I use <%#container.DataItem('memoText')%>, it displays it with no line breaks. Is there a function to convert the line breaks on the memo field?...
6
by: Matt | last post by:
I'm having difficulty with trying to update a Access memo field through an SQL statement where the value I'm trying to pass is longer than 255 characters. The field is being truncated. I'm using...
0
by: Ennio-Sr | last post by:
Hi all! After a very long struggle I finally succeded in transferring my old *.dbf file and the relating *.dbt (alias memo fields) to a pg table. For the time being I put the memo field in a...
0
by: Stephen E. Weber | last post by:
I have a series of HTM files, I want to dynamically display these on the screen, in the active window as part of an information screen which will have additional objects, what is a good way to do...
4
by: Mark Reed | last post by:
Hi All, here is what I am trying to achieve. I have a memo field on a form which users will need to add to as and when. I do not want them to be able to edit information which already exists...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
0
by: Kassimu | last post by:
Hi guys out there, There is this database Iam creating, I have a table with 40 fields among which there are Date/time, Text, Number, Memo and Yes/No fields and I have created the form bound to that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.