Click here to Skip to main content
12,253,599 members (54,264 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET SQL-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
sr_24484
Edited 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.
subodhrastogi24 22-Feb-13 5:29am
   
Capitals words were to emphasize the important words ..whats d problem _Amy ???
richcb 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

Rate this: bad
 
good
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.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100