473,405 Members | 2,141 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,405 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 3426
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.