Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: <asp:Textbox> <enter> key (CR) can't be save to a database

Reply
Thread Tools

Re: <asp:Textbox> <enter> key (CR) can't be save to a database

 
 
Cem Sisman
Guest
Posts: n/a
 
      03-31-2009
when the save process begins, try doing this ;

string val = textbox1.Text.replace("\r\n","<br />");

or when you retrive the data from database ;

textbox1.Text = dbValue.replace("\r\n","<br />");


--

Cem Sisman
twitter: @cemsisman
http://cemsisman.com


"Gabriel" <> wrote in message
news:9A1C3F57-8A7F-423B-B518-...
>I not to be able to store the carriage return from a multiline textbox
> control on my web application.
>
> So when the data is displayed back from the database there are no carriage
> return. All the lines are displayed as a single long line.
>
> I've check the database (MSSQL 200 and it doesn't seem to be storing it.
> But if I save the information from a textbox using a winform everything is
> stored correctly.
>
> Does anyone have any suggestions to help me solve this problem?
>
> I am using Visual Studio 2008. C# in a web application running from IIS
> 6.0
>
> Thanks.


 
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
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
<asp:Textbox> <enter> key (CR) can't be save to a database Gabriel ASP .Net 2 03-31-2009 09:46 PM
QuickBooks Key v6.5.918 WinALL, Quicken Key v6.5.918 WinALL, Peachtree Accounting Key v6.5.971 WinALL, new ! code_fu NZ Computing 0 10-10-2004 02:26 PM
Replace Tab Key to Return Key (Enter Key) from Web Forms? M P ASP General 1 08-06-2004 08:32 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57