Insert new line inside textboxs for VB.NET and C# and JavaScript


/ Published in: VB.NET
Save to your folder(s)



Copy this code and paste it in your HTML
  1. para la parte del servidor
  2.  
  3. Environment.NewLine
  4.  
  5.  
  6.  
  7. para javascript
  8.  
  9.  
  10. observacion = oDetalleComprobante.Observacion.Replace("\n", "\\n");
  11. observacion = observacion.Replace("<br />", "\\n");
  12.  
  13.  
  14. string aRetornar = "";
  15. if (descripcion != null)
  16. {
  17. aRetornar = descripcion.Replace("\n", "<br />");
  18. HttpUtility.HtmlEncode(aRetornar);
  19. return aRetornar;
  20. }
  21. else
  22. return "";

URL: http://www.geekpedia.com/KB19_How-can-I-insert-a-new-line-in-a-TextBox.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.