Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-07-29 : 12:50:08
|
Hello,whats the serverside code equivalent for line feed. I know its "\n"I have a script to replace("\n", "") to remove the line feed on a textbox, but it is not workingI know its VbCrf in VB, but whats it in c# ?thanksEhi |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-07-29 : 12:54:45
|
Environment.NewLine;_______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-07-29 : 15:38:26
|
Thanks Spirit,however i have a slight problem, when i runrecepients = recepients.Replace(Environment.NewLine, ",");or recepients = recepients.Replace(System.Environment.NewLine, ",");and in the textbox i puthellohellohelloI get results hello ,hello,helloThere is still a space on the first character. Quite confusing, but other characters are fine. |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-07-29 : 15:57:39
|
Sorry got it sorted.I also was trying recepients = recepients.Replace("\n", ","); recepients = recepients.Replace("\r", ",");which both works well. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-07-29 : 16:02:33
|
note that Environment.NewLine is preferable to \n or \r_______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-07-29 : 20:26:52
|
Yeah I know. ThanksI was initially using recepients = recepients.Replace("\n", ",");But noticed there was an error. I have corrected it and usedrecepients = recepients.Replace(System.Environment.NewLine, ","); |
|
|
|
|
|
|
|