Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > simple one..... from HTML to SQL to HTML... i lose my new lines

Reply
Thread Tools

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

 
 
Justin Rich
Guest
Posts: n/a
 
      06-14-2005
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?


 
Reply With Quote
 
 
 
 
Aaron Corcoran
Guest
Posts: n/a
 
      06-14-2005
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

 
Reply With Quote
 
 
 
 
Justin Rich
Guest
Posts: n/a
 
      06-15-2005
FieldValue is not part of a SQLDataSource.
also what namespace is the Chr function in?

Thanks
Justin

"Aaron Corcoran" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why stdin lose after new Thread haomiao Perl Misc 1 07-28-2008 01:11 AM
You lose some, and then you lose some ... Lawrence D'Oliveiro NZ Computing 13 09-24-2006 08:29 AM
How to break the lines in printing to html lines? Ciba LO Perl Misc 4 07-08-2006 02:58 AM
Asp.Net Calender, how to display 5 lines if there are only 5 lines in one month? Jack ASP .Net 9 10-12-2005 03:44 AM
Re: how to read 10 lines from a 200 lines file and write to a new file?? Joe Wright C Programming 0 07-27-2003 08:50 PM



Advertisments