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

simple one..... from HTML to SQL to HTML... i lose my new lines

Im not sure where i lose the new line stuff but when i pull it back from the
DB its gone.

Im using the SQLDataSource control. i pull it and push to a asp:textbox.

i assume there is something simple i need to do?
Nov 19 '05 #1
2 935
Justin,

I believe that a simple replace statement should solve your problems.
If I am not mistaken, it is stored in SQL as Chr(13). You should be
able to do a replace command and replace the Chr(13) with a <BR> tag.

Let me know if this helps. I know the following is what is used when a
datagrid is populated:

<asp:TemplateColumn HeaderText="myField" Visible="True">
<ItemTemplate>
<%# myDataSet.FieldValue("myField", Container).
Replace(Chr(13), "<br>") %>
</ItemTemplate>
</asp:TemplateColumn>

Aaron

Nov 19 '05 #2
FieldValue is not part of a SQLDataSource.
also what namespace is the Chr function in?

Thanks
Justin

"Aaron Corcoran" <ac*******@lasers.state.la.us> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Justin,

I believe that a simple replace statement should solve your problems.
If I am not mistaken, it is stored in SQL as Chr(13). You should be
able to do a replace command and replace the Chr(13) with a <BR> tag.

Let me know if this helps. I know the following is what is used when a
datagrid is populated:

<asp:TemplateColumn HeaderText="myField" Visible="True">
<ItemTemplate>
<%# myDataSet.FieldValue("myField", Container).
Replace(Chr(13), "<br>") %>
</ItemTemplate>
</asp:TemplateColumn>

Aaron

Nov 19 '05 #3

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

Similar topics

11
by: alex | last post by:
Hi, I am looking for a way to populate an HTML table from an external local text file which looks like this: DATE/TIME LAT. LON. DEPTH. ML....
2
by: Neil | last post by:
I have an Access 2000 report which has a single page with text and graphics and a subreport with line item detail. In order to retain lines and graphic objects, I use automation to produce a file...
5
by: Rob Somers | last post by:
Hey all I am writing a program to keep track of expenses and so on - it is not a school project, I am learning C as a hobby - At any rate, I am new to structs and reading and writing to files,...
6
by: KevinD | last post by:
assumption: I am new to C and old to COBOL I have been reading a lot (self teaching) but something is not sinking in with respect to reading a simple file - one record at a time. Using C, I am...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
6
by: Christopher Glenn | last post by:
I have very basic html skills. My friend who has a wide screen monitor and is using IE7 sent me a jpg screen shot of my home page. I have attached this jpg, but I recall a while back that...
2
by: mer000 | last post by:
Can you guys help me out? I'm trying to create a very simple game of craps but having some trouble. Below are the rules and requirements. Much appreciated! Given the following rules for the game...
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
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...
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,...

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.