How to remove indent of ASP.NET Server Controls

Discussion in 'ASP .Net Building Controls' started by MumHa, Dec 7, 2005.

  1. MumHa

    MumHa Guest

    Hi,

    I created a new webcontrol that inherited from CompositeControl, and on
    override of CreateChildControls() I added Panels.
    When I view html source code on browser, the source code was indented,
    but I dont want.

    How I remove the indent?

    Regards,

    Rafael L.
    MumHa, Dec 7, 2005
    #1
    1. Advertising

  2. override the render method. load all the text into a stringbuilder remove
    the tabs and write it to the HtmlWriter parameter of the render method.

    --
    Daniel Fisher(lennybacon)
    http://www.lennybacon.com


    "MumHa" <> wrote in message
    news:...
    > Hi,
    >
    > I created a new webcontrol that inherited from CompositeControl, and on
    > override of CreateChildControls() I added Panels.
    > When I view html source code on browser, the source code was indented,
    > but I dont want.
    >
    > How I remove the indent?
    >
    > Regards,
    >
    > Rafael L.
    >
    Daniel Fisher\(lennybacon\), Dec 7, 2005
    #2
    1. Advertising

  3. MumHa

    Riki Guest

    "MumHa" <> wrote in message
    news:...
    > Hi,
    >
    > I created a new webcontrol that inherited from CompositeControl, and on
    > override of CreateChildControls() I added Panels.
    > When I view html source code on browser, the source code was indented,
    > but I dont want.
    >
    > How I remove the indent?


    Apart from Daniel's solution, you could also try using PlaceHolders instead
    of Panels.
    Panels generate <div> tags in most browsers, but PlaceHolders don't.

    --

    Riki
    Riki, Dec 7, 2005
    #3
    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. Brad Gillespie

    Eclipse how to remove auto-indent....

    Brad Gillespie, Aug 25, 2003, in forum: Java
    Replies:
    0
    Views:
    2,925
    Brad Gillespie
    Aug 25, 2003
  2. CEFM

    <ul> Remove Indent

    CEFM, Apr 25, 2005, in forum: HTML
    Replies:
    2
    Views:
    41,738
    Toby Inkster
    Apr 25, 2005
  3. Bob Rock
    Replies:
    1
    Views:
    606
    Cowboy \(Gregory A. Beamer\)
    Sep 17, 2006
  4. dt
    Replies:
    4
    Views:
    465
    CBFalconer
    Dec 31, 2006
  5. lotusshiv

    Indent text items in a ListBox Web Control in ASP.Net 1.0

    lotusshiv, Apr 27, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    238
    lotusshiv
    Apr 27, 2006
Loading...

Share This Page