Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Updated 22-Feb-13 6:03am
v5
Comments
_Amy 22-Feb-13 5:23am    
Don't shout. Typing the words/sentences in Capital letter is called shouting in internet.
sr_24 22-Feb-13 5:29am    
Capitals words were to emphasize the important words ..whats d problem _Amy ???
Richard C Bishop 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 22-Feb-13 12:12pm    
See here: http://en.wikipedia.org/wiki/Etiquette_(technology)

1 solution

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.
SQL
'This is line 1.' + CHAR(13)+CHAR(10) + 'This is line 2.'


c# code that you need to implement from your application
C#
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900