Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NETSQL-Server
i have a multiline textbox like as a Email body i save the user input IN USER GIVEN FORMATTING in user given formatting, but when i fetch it this information in another page , having same multi line textbox ,then all the information having formatting --- as line break.

[Edit]Removed shouting[/Edit]
Posted 21-Feb-13 23:21pm
Edited 22-Feb-13 6:03am
_Amy at 22-Feb-13 5:23am
Don't shout. Typing the words/sentences in Capital letter is called shouting in internet.
subodhrastogi24 at 22-Feb-13 5:29am
Capitals words were to emphasize the important words ..whats d problem _Amy ???
richcb at 22-Feb-13 12:05pm
Only capitalize the first letter to signify importance and only if it is a proper noun or the beginning of a sentence.
OriginalGriff at 22-Feb-13 12:12pm
See here:

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you want to save line break in sql server, you need to transform code like as follows
When you found new line charecter like Environment.NewLine or "\n\r" then you need to replace that code. tsql code you run it from enterprize manager and see the output.
'This is line 1.' + CHAR(13)+CHAR(10) + 'This is line 2.'
c# code that you need to implement from your application
string data = "Good Morning\r\nI am fine";
string newData = data.Replace("\r\n","CHAR(13)+CHAR(10)");
and that newData will be store/read to sql server.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
0 Shai Vashdi 576
1 OriginalGriff 183
2 Tadit Dash 160
3 Sergey Alexandrovich Kryukov 136
4 praveen_07 115
0 Sergey Alexandrovich Kryukov 9,280
1 OriginalGriff 5,473
2 Peter Leow 4,100
3 Maciej Los 3,540
4 Abhinav S 3,333

Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid