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> |