How To Make a "Enter" key by C# in ASP.net -


i wrote code in c#:

using (streamwriter streamwriter = file.createtext(@"c:\file.html")) {     streamwriter.writeline(textbox2.text); } 

this code opens file.html , copies value of textbox2 when open file.html characters on 1 line, though there multple lines of text in textbox. how newline characters show in file?

try

streamwriter.writeline(textbox2.text.replace(environment.newline, "<br/>")); 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -