<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"  %>

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

<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label2.Text = DateTime.Now.ToLongTimeString();
    }    
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Label2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function myContentClickHandler()
            {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content");
            }
            function myContentClickTargetHandler()
            {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequestWithTarget("<%= Button1.UniqueID %>", "");
            }
        </script>
    </telerik:RadCodeBlock>
    <asp:Button ID="Button1" runat="server" OnClientClick="myContentClickHandler(); return false;" Text="content button" OnClick="Button1_Click"/>
    <asp:Button ID="Button2" runat="server" OnClientClick="myContentClickTargetHandler(); return false;" Text="content button target"/>
    <asp:Label ID="Label2" runat="server"></asp:Label>
</asp:Content>

