Rad Ajax renders not correctly - extra lines created

2 posts, 0 answers
  1. Jukka
    Jukka avatar
    2 posts
    Member since:
    Jan 2009

    Posted 10 Feb 2010 Link to this post

    Hi,

    We have seen that even simple ajaxing with RadAjaxManager creates extra blank lines in the rendered HTML. Here is an example below. When the "Test" Button is clicked, there will be an extra empty line between the "Test" button and the "Test Text" line on the page. If you know a solution or a fix for this, please let us know. Thanks! Jukka.

    <%

     

    @ Page Language="C#" AutoEventWireup="true" CodeBehind="test2.aspx.cs" Inherits="HVHS.Apps.VNMS.Web.test2" %>

     

    <!

     

     

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     

    <%

     

    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

     

    <

     

     

    html xmlns="http://www.w3.org/1999/xhtml" >

     

    <

     

     

    head runat="server">

     

     

     

    <title>Untitled Page</title>

     

    </

     

     

    head>

     

    <

     

     

    body>

     

     

     

    <form id="form1" runat="server">

     

     

     

    <div>

     

     

     

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

     

     

     

     

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

     

     

     

    <AjaxSettings>

     

     

     

    <telerik:AjaxSetting AjaxControlID="btnTest">

     

     

     

    <UpdatedControls>

     

     

     

    <telerik:AjaxUpdatedControl ControlID="Panel1" />

     

     

     

    </UpdatedControls>

     

     

     

    </telerik:AjaxSetting>

     

     

     

    </AjaxSettings>

     

     

     

    </telerik:RadAjaxManager>

     

     

     

     

    <asp:Button ID="btnTest" runat="server" OnClick="btnTest_Click" Text="Test" />

     

     

     

    <asp:Panel ID="Panel1" runat="server"/>

     

    Test Text

     

     

    </div>

     

     

     

    </form>

     

    </

     

     

    body>

     

    </

     

     

    html>

     

    cs:

    using

     

     

    System;

     

    using

     

     

    System.Collections;

     

    using

     

     

    System.Configuration;

     

    using

     

     

    System.Data;

     

    using

     

     

    System.Linq;

     

    using

     

     

    System.Web;

     

    using

     

     

    System.Web.Security;

     

    using

     

     

    System.Web.UI;

     

    using

     

     

    System.Web.UI.HtmlControls;

     

    using

     

     

    System.Web.UI.WebControls;

     

    using

     

     

    System.Web.UI.WebControls.WebParts;

     

    using

     

     

    System.Xml.Linq;

     

    namespace

     

     

    HVHS.Apps.VNMS.Web

     

    {

     

     

    public partial class test2 : System.Web.UI.Page

     

    {

     

     

    protected void Page_Load(object sender, EventArgs e)

     

    {

    }

     

     

    protected void btnTest_Click(object sender, EventArgs e)

     

    {

    }

    }

    }

  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 12 Feb 2010 Link to this post

    Hi Jukka,

    In order to avoid this behavior you should set UpdatePanelsRenderMode property of RadAjaxManager control to Inline. This property allows you to control the render mode for all ajaxified controls.

    However, for your convenience I am sending you a simple working application which demonstrates the desired behavior. Please examine it and let me know if you have other questions or problems.

    Additionally, please review the following help article:
    http://www.telerik.com/help/aspnet-ajax/update-panels-render-mode.html

    I hope this helps.

    Kind regards,
    Pavlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top