adding linebreaks to a control

Discussion in 'ASP .Net Web Controls' started by Chandy, Jun 29, 2004.

  1. Chandy

    Chandy Guest

    Hi,

    I have a user control which build a list menu from HtmlGenericControl
    objects (UL and LI). It works well and produces valid HTML, but all
    on one line. Any ideas as to how I can get the syntactically-valid
    equivalent of the following?

    ul.Controls.Add(CType(VbCrLf,Control))

    TIA

    Chandy
    Chandy, Jun 29, 2004
    #1
    1. Advertising

  2. Hi Chandy,

    How about creating a new literal control with the text = "<br />" and add
    that to the controls collection each time you need a line break?

    Ken

    "Chandy" <> wrote in message
    news:...
    > Hi,
    >
    > I have a user control which build a list menu from HtmlGenericControl
    > objects (UL and LI). It works well and produces valid HTML, but all
    > on one line. Any ideas as to how I can get the syntactically-valid
    > equivalent of the following?
    >
    > ul.Controls.Add(CType(VbCrLf,Control))
    >
    > TIA
    >
    > Chandy
    Ken Cox [Microsoft MVP], Jun 29, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Landgraf

    Replacing linebreaks with <br>

    Stefan Landgraf, Aug 19, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    390
    Stefan Landgraf
    Aug 19, 2003
  2. Replies:
    2
    Views:
    592
  3. meltedown

    linebreaks in a text area

    meltedown, Oct 20, 2005, in forum: HTML
    Replies:
    3
    Views:
    511
    Mark Parnell
    Oct 20, 2005
  4. michga
    Replies:
    0
    Views:
    444
    michga
    Jun 14, 2006
  5. =?ISO-8859-15?Q?Martin_K=F6rner?=

    email: Content-Disposition and linebreaks with long filenames

    =?ISO-8859-15?Q?Martin_K=F6rner?=, Apr 13, 2005, in forum: Python
    Replies:
    2
    Views:
    3,488
    David Bolen
    Apr 19, 2005
Loading...

Share This Page