locked
UpdatePanel causes unwanted linebreak RRS feed

  • Question

  • User-1548129933 posted

    Hi,
    I have an update panel right after the text "Capture vital Web site data." (see below).  Just before the update panel I get a linebreak. It's suppose to be continuous text.  I've tried &npsb; and everything else I can think of, but nothing works.  Does anybody know why this is happening?  Any ideas on the work around?

    Capture vital Web site data.(line break here)
    <ajax:UpdatePanel ID="mypanel" runat="server" RenderMode="Block">
    <ContentTemplate>
    <asp:Label ID="mylabel" runat="server" CssClass="pricingText" Font-Names="Arial" Font-Size="11px" Style="z-index: 102;">
    </asp:Label>
    </ContentTemplate>
    <triggers>
    <ajax:AsyncPostBackTrigger ControlID="DropCurrencyList" EventName="SelectedIndexChanged" />
    </triggers>
    </ajax:UpdatePanel>

    thanks.....

    Thursday, October 11, 2007 12:20 AM

Answers

  • User1075616431 posted

    Hello,

    I regularily run into this, and the way I handle it is just adding a small table and putting it in the same "tablerow".

    If anyone has a better suggestion, I am all ears... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 11, 2007 4:39 AM

All replies

  • User1075616431 posted

    Hello,

    I regularily run into this, and the way I handle it is just adding a small table and putting it in the same "tablerow".

    If anyone has a better suggestion, I am all ears... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 11, 2007 4:39 AM
  • User-125421206 posted

    Try: RenderMode="Inline"

    The default "RenderMode" property of an UpdatePanel is "Block."  When you don't specify a RenderMode, or you specify RenderMode="Block", the UpdatePanel renders as an HTML "div", and a div creates a line break by default.  If you set RenderMode="Inline" then the UpdatePanel renders as an HTML "span" which doesn't cause a line break.

    Hope this helps!

    Andy

    Friday, June 13, 2008 12:34 PM
  • User1170637802 posted

    This is the correct answer @Piper Douglas. People please follow his suggestion!

    Wednesday, December 11, 2013 11:54 AM