c# - How do I programmatically add NewLines to a TFS work item textbox? -


i have web system has few hooks our tfs work item system. 1 of things trying when action performed, takes current text in 1 field , makes comment in "general comments" field announcing field (yes know, history contains higher ups want in gen comments).

the problem having tfs seems ignoring environment.newlines have in string. code:

                    item.fields[gencomments].value = string.concat(datetime.now.toshortdatestring()                                 , " - qa dashboard - required date reason set \"hotfix\", contained \""                                 , item.fields[reqbydtreason].value.tostring()                                 , "\"."                                 , environment.newline                                 , environment.newline                                 , environment.newline                                 , item.fields[gencomments].value.tostring()); 

so assuming general comments section contains:

this sentence in general comments 

i following output in general comments section when work item saved

9/29/2010 - qa dashboard - required date reason set "hotfix", contained "hotfixtest".this sentence in general comments 

why ignoring new lines , how can new line work item?

thanks,

tfs work item content processed html. that's happening here , hence it's ignoring extraneous newlines in text. try wrapping content in <pre> block or using <p> , see if fixes issue.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -