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
Post a Comment