Replace new line with <br/> with C#

temp=TextBox1.Text;

temp = temp.Replace("\r\n","<br>");

You can use this method in Controllers as well.