Carriage Return in Web.config file?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Waldy

    Carriage Return in Web.config file?

    Hi there,
    I am reading a string from a web.config file and displaying
    it in a label on an .ASPX page. I want a carriage return in the string so
    that it looks right, but can't get it to put one in.. I have tried using \n
    and e.t.c. in the config file setting but none of those produce a
    carraige return in the output. Is this possible?


  • Mark Rae [MVP]

    #2
    Re: Carriage Return in Web.config file?

    "Waldy" <someone@micros oft.comwrote in message
    news:ezzFP$iwIH A.4916@TK2MSFTN GP03.phx.gbl...
    I am reading a string from a web.config file and displaying it in a label
    on an .ASPX page. I want a carriage return in the string so that it looks
    right, but can't get it to put one in.. I have tried using \n and
    e.t.c. in the config file setting but none of those produce a carraige
    return in the output. Is this possible?
    <br />


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Waldy

      #3
      Re: Carriage Return in Web.config file?

      "Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
      news:OpHPLUjwIH A.3780@TK2MSFTN GP03.phx.gbl...
      <br />

      Hi Mark,
      I've tried that, but it doesn't work. It crashes the
      application if you just enter <br/in the web.config file and if you escape
      the less than / greater than characters, it just comes out as <br/in the
      text.


      Comment

      • rogers.terry@gmail.com

        #4
        Re: Carriage Return in Web.config file?

        On May 30, 10:26 am, "Waldy" <some...@micros oft.comwrote:
        "Mark Rae [MVP]" <m...@markNOSPA Mrae.netwrote in messagenews:OpH PLUjwIHA.3780@T K2MSFTNGP03.phx .gbl...
        >
        Hi Mark,
        I've tried that, but it doesn't work. It crashes the
        application if you just enter <br/in the web.config file and if you escape
        the less than / greater than characters, it just comes out as <br/in the
        text.
        Try a Literal instead of a Label.

        Comment

        • Waldy

          #5
          Re: Carriage Return in Web.config file?


          "Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
          news:OpHPLUjwIH A.3780@TK2MSFTN GP03.phx.gbl...
          <br />
          Mark,
          you were right. I realised that I was using a span directly
          rather than an asp:label to render a span. If you set the label text it
          does process the <brand render a new line.


          Comment

          Working...