This is a migrated thread and some comments may be shown as answers.

RadAjaxManager bug with updating label

3 Answers 85 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Aaron Gibbs
Top achievements
Rank 2
Aaron Gibbs asked on 12 Nov 2008, 04:57 PM

Hello,

I have perhaps discovered a bug with the AjaxManager when an asp:Label is placed inside the UpdatedControls list for an AjaxSetting.  I have tried this in IE7, FireFox 2 and Google Chrome.

If you add an AjaxSetting and place an asp:Label as one of the UpdatedControls, when rendering the HTML a <div> tag is placed around the label text, which causes a linebreak to appear in the browser.  This may be intended behavior but I'm guessing not?

Cut-and-paste the code sample below and you'll see what I mean.  I'm using the Q2 2008 version for .Net 2.0.  When viewing this in a browser you'll notice there appears to be a linebreak between "text1" and "text2" -- view the source and you'll notice the extra <div> tag around Label1 which is causing the linebreak to appear.

I actually spent hours troubleshooting this today . . . very bizarre, I finally just started plucking elements from my page to discover why this extra <div> tag was being placed around one of my labels, causing the linebreak to appear in IE, and when I finally got to eliminating the RadAjax controls I discovered it.  Your help & input is appreciated!!

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="testbug.aspx.vb" Inherits="_Controls_testbug" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="Server"></telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Button1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <asp:Button ID="Button1" runat="Server" Text="Button1" /> 
        <asp:Label ID="Label1" runat="server" Text="text1"></asp:Label> 
        <asp:Label ID="Label2" runat="server" Text="text2"></asp:Label> 
        <asp:Label ID="Label3" runat="server" Text="text3"></asp:Label> 
    </form> 
</body> 
</html> 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Nov 2008, 07:40 AM
Hello Aaron,

Please check this article for more info:
http://www.telerik.com/help/aspnet-ajax/layout-problem-updated-controls-on-new-line.html

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cyrus
Top achievements
Rank 1
answered on 14 Apr 2009, 03:10 PM
Thanks for the info...this casued me HOURS of frustration...can you make the default behavior INLINE so others don't go mental when using AJAX?  :)
0
Nikolay Rusev
Telerik team
answered on 16 Apr 2009, 02:48 PM
Hi Cyrus,

UpdatePanelRenderMode controls UpdatePanel.RenderMode. Default value of ever UpdatePanel is Block. This is where RadAjaxManager/RadAjaxPanel inherit this behavior.

For reference you can use following link:
UpdatePanel..::.RenderMode Property

Regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Aaron Gibbs
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Cyrus
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or