Posted By

ramirocalero on 10/27/10


Tagged

new VBNet line newline inside c# etxtbox


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

danfinrud55


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


 / Published in: VB.NET
 

URL: http://www.geekpedia.com/KB19_How-can-I-insert-a-new-line-in-a-TextBox.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 "";

Report this snippet  

You need to login to post a comment.