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

Line feeds in a GridView

Hi,

If a database field contains more than one line of text, i.e. Several
Environment.NewLine characters, the GridView cell ignores them. If I replace
the NewLine with "<br />" - the GridView helpfully converts that string to
"&lt;br %gt;" and so I don't get the CrLf - arrgh! this used to be easy, am
I missing a simple trick?

The colums are autogenerated, which works perfectly except for this problem.

Can anyone help?

TIA
Nov 4 '06 #1
1 2915
OK,

I finally managed to dig down through the smart-tag to find the HtmlEncode
property of the BoundField and set it to false. so, by replacing NewLine
with "<br />" in the database, it all works.
"MSNews" <me@here.comwrote in message
news:eC**************@TK2MSFTNGP04.phx.gbl...
Hi,

If a database field contains more than one line of text, i.e. Several
Environment.NewLine characters, the GridView cell ignores them. If I
replace the NewLine with "<br />" - the GridView helpfully converts that
string to "&lt;br %gt;" and so I don't get the CrLf - arrgh! this used to
be easy, am I missing a simple trick?

The colums are autogenerated, which works perfectly except for this
problem.

Can anyone help?

TIA

Nov 4 '06 #2

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

Similar topics

7
by: Jason | last post by:
When users fill out my text area field, there is a chance that there will be no line feeds or cariage returns or spaces and just one really long word. THIS CAUSES A MAJOR PROBLEM! What I am trying...
1
by: Frank Esser | last post by:
Hello, I read data from a DB field where a line feed ("\n") is in. I put this data as text to a label web control. In the HTML page the line feeds are shown as real line feeds in the HTML...
2
by: bobkaku | last post by:
I added "MIME-Version: 1.0\r\nContent-Type:text/html; charset=iso-8859-1\r\n" as one of the parameters in the mail( ) function to replace the "Nobody" with a real From: email. That worked. ...
5
by: =?Utf-8?B?QWRhciBXZXNsZXk=?= | last post by:
Hi All, I have a GridView inside the EditItemTemplate of a FormView. Both FormView and GridView are data bound using an ObjectDataSource. When the FormView's ObjectDataSource object has a...
3
by: towers | last post by:
Hi I'm probably doing something stupid but I've run into a problem whereby I'm trying to add a csv file to a zip archive - see example code below. The csv just has several rows with carriage...
13
by: charliefortune | last post by:
I am fetching some product feeds with PHP like this $merch = substr($key,1); $feed = file_get_contents($_POST); $fp = fopen("./feeds/feed".$merch.".txt","w+"); fwrite ($fp,$feed); fclose...
3
by: wildman | last post by:
Is there any way for gridview cells to observe vbcrlf in the data? I attempted to do this, but it does not seem to work. Dim dgItem As GridViewRow For Each dgItem In gridCollaborator.Rows...
3
by: Anonymous | last post by:
How do I publish a web site (web application .net 2.0) from the command line in VS2008?
2
by: tom0550 | last post by:
Around December 2008 our MS Access 2003 application started inserting extra line feeds everytime the RTF edit window was opened and saved. It was working fine up to that time. We are using the MS...
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: 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
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
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
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.