473,394 Members | 1,734 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.

Problem with multiple lines in db data

hey

asp.net 2.0

In my db (sql server 2005) I have a record which consist of multiple lines:
"HEY
THIS IS A TEST
OF MULTIPLE
LINES"

But when I retrieve this value and put it into a formview field, the data is
displayed like this:
"HEY THIS IS A TEST OF MULTIPLE LINES"

Some of the settings on the textbox displaying the datafield on one row (I
want it to display multiple lines)
<asp:TextBox TextMode="MultiLine" ID="jalla" runat="server"... >
</asp:TextBox>

Any suggestions to what I should do to get this datafield displaying the
original text (multiple lines)?

Aug 25 '06 #1
1 1271
When you set the TextMode attribute to "Mulitline", the control will render
as an HTML TextArea. Your text has to be html compliant to display on
multiple lines so you need to take a look at the output and see whats being
displayed. Sometimes, replacing carriage returns with <bror wrapping the
whole section in <pretags may be necessary but it all depends on what went
into your database in the first place.

Regards

John Timney (MVP)
"Loading name..." <it_consultant1@NO_SPAM.hotmail.comwrote in message
news:uN**************@TK2MSFTNGP04.phx.gbl...
hey

asp.net 2.0

In my db (sql server 2005) I have a record which consist of multiple
lines:
"HEY
THIS IS A TEST
OF MULTIPLE
LINES"

But when I retrieve this value and put it into a formview field, the data
is displayed like this:
"HEY THIS IS A TEST OF MULTIPLE LINES"

Some of the settings on the textbox displaying the datafield on one row (I
want it to display multiple lines)
<asp:TextBox TextMode="MultiLine" ID="jalla" runat="server"... >
</asp:TextBox>

Any suggestions to what I should do to get this datafield displaying the
original text (multiple lines)?

Aug 25 '06 #2

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

Similar topics

14
by: JStrauss | last post by:
Hello, Can anybody give me some tips on the best and/or easiest way to display multiple lines in a field. The data is collected from a "textarea" field when the form is submitted, and I want to...
3
by: David L Wright II | last post by:
I have a data bound listbox that I want to select multiple lines then process each line. I bound a two column datatable to the listbox and set the DisplayMember property to the appropriate column...
2
by: pengbsam | last post by:
Hello: I need to write a program that search through multiple level BOM, get all the items. It seems like a easy enough project, but when I put my hands on it and couple of hundred lines of codes...
3
by: Student | last post by:
Hi all, While compiling a program I had this message : tools.o(.data+0x0): multiple definition of `VAR_1' main.o(.data+0x0): first defined here tools.o(.data+0x4): multiple definition of...
4
by: BA | last post by:
Hello, I have a very strange code behavior that I cannot make heads or tails of: I have c# code being executed in BizTalk assemblies which is acting very strangely. In my BizTalk process I...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
1
by: dhyder | last post by:
OK, like the title says my error is Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. I have looked into this a lot, but have not...
1
by: the_ricka | last post by:
Hi all, I'm fairly new to python, but very excited about it's potential. I'm trying to write a simple program that will accept input from a command line and send email. The parameters I used on...
3
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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...

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.