In my application I need all controls, that are inside specific panel, to
trigger update on the same and possibly other panels. There are also
panels that must not be updated by these controls. These panels however need to be updated by some other controls. Therefore I need to specify them as UpdatedControls in RadAjaxManager as well. For example in the code below I want Button1 to trigger update on UpdatePanel1, but not UpdatePanel2. However when I click Button1 UpdatePanel2 gets updated.
Default.aspx
Default.aspx.cs
Is there a way to achieve what I need without explicitly specifying each control as a trigger(AjaxControlID)? I'm using 2010 Q1 release.
Thanks.
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadAjaxManagerTest._Default" %> |
<!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></title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<div> |
<telerik:RadScriptManager runat="server" /> |
<telerik:RadAjaxManager ID="ajaxManager" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="UpdatePanel1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="UpdatePanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="UpdatePanel2"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="UpdatePanel2" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<asp:Panel ID="UpdatePanel1" runat="server"> |
<asp:Label ID="Label1" runat="server" /> |
<asp:Button ID="Button1" runat="server" Text="Button1" /> |
</asp:Panel> |
<asp:Panel ID="UpdatePanel2" runat="server"> |
<asp:Label ID="Label2" runat="server" /> |
<asp:Button ID="Button2" runat="server" Text="Button2" /> |
</asp:Panel> |
</div> |
</form> |
</body> |
</html> |
using System; |
namespace RadAjaxManagerTest |
{ |
public partial class _Default : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
Label1.Text = Label2.Text = "LastUpdated: " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); |
} |
} |
} |
Is there a way to achieve what I need without explicitly specifying each control as a trigger(AjaxControlID)? I'm using 2010 Q1 release.
Thanks.