Multiline TextBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • truezplaya
    New Member
    • Jul 2007
    • 115

    Multiline TextBox

    Hi all

    I am currently trying to populate a textbox(textbox 1) with a few lines of data which sounds simple!

    The data is being set from a back page so .cs

    Code:
     Dim myitem As New TextBox.classData.PorductOrderInfo
            myitem.DateOrdered = "20/02/2009"
            myitem.Title = "myTest"
            myitem.Body = "Body Oh YEAHHHHHHHHHHH"
         
    
            TextBox1.Text = myitem.Title.ToString + Environment.NewLine + myitem.DateOrdered.ToString
    it displays both items but on the same line
    I have tried other ways as well but none seem to work.
    From what i have read it is because it will be displaying in html but i am unsure how to put the break in any input would be highly appreciated

    Truez
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    If TextBox1 is a REAL textbox, and not like a label or something else, then using Environment.New Line should be correct.
    Is TextBox1 set to be multiline?

    Comment

    • truezplaya
      New Member
      • Jul 2007
      • 115

      #3
      The texbox1 is an asp:textbox and doesn't seem to have a multiline property.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Originally posted by truezplaya
        The texbox1 is an asp:textbox and doesn't seem to have a multiline property.
        Sure they do:
        TextMode="multi line"

        Comment

        • truezplaya
          New Member
          • Jul 2007
          • 115

          #5
          ah cheers i couldn't see it in properies so i was like where is it ! :)

          Comment

          Working...