Carriage Return/LineFeed in textbox in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clarkjo
    New Member
    • Feb 2007
    • 1

    Carriage Return/LineFeed in textbox in vb.net

    I'd like to dynamically populate a text box in vb.net web app by concatenating several field values. In between each value I'd like a line feed. How would I add a line feed in the following example in order to force a new line between drp1 and drp2 ?

    txtTextBox1.Tex t = "drp1= " + drpDownlist1.Se lectedValue _
    + " drp2= " + drpDownList2.Se lectedValue

    Thanks,

    Joe
  • enreil
    New Member
    • Jan 2007
    • 86

    #2
    You can use Environment.New Line(). Not sure if that's the best way, but it works for me.

    Originally posted by clarkjo
    I'd like to dynamically populate a text box in vb.net web app by concatenating several field values. In between each value I'd like a line feed. How would I add a line feed in the following example in order to force a new line between drp1 and drp2 ?

    txtTextBox1.Tex t = "drp1= " + drpDownlist1.Se lectedValue _
    + " drp2= " + drpDownList2.Se lectedValue

    Thanks,

    Joe

    Comment

    Working...