<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultAjaxRequest.aspx.cs"
    Inherits="DefaultAjaxRequest" %>

<%@ 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></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                function clientClick() {

                    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                    ajaxManager.ajaxRequest();
                }
                function GetHiddenFieldValue() {

                    var hiddenFiled = $get("<%= hdHiddenFieldID.ClientID %>");
                    alert(hiddenFiled.value);
                }
            </script>
        </telerik:RadCodeBlock>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <telerik:RadAjaxManager ID="RadAjaxManager1" ClientEvents-OnResponseEnd="GetHiddenFieldValue" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
         <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="hdHiddenFieldID" />
         </UpdatedControls>
         </telerik:AjaxSetting>                   
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <asp:Button ID="btnServer" runat="server" Text="Make client AjaxRequest" OnClientClick="clientClick();" />                
            <asp:HiddenField ID="hdHiddenFieldID" runat="server" Value="Make client AjaxRequest" />         
        </div>
    </div>
    </form>
</body>
</html>
