<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default18.aspx.cs" Inherits="Default18" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik"%>
<%@ Register Src="~/TemplateUserControl.ascx" TagPrefix="my" TagName="control"%>
<!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>
    <telerik:RadScriptBlock runat="server" ID="SB1">
        <script type="text/javascript">
            function getGrid()
            {
                PageMethods.GetGrid(update);            
                return false;
            }

            function update(result)
            {                
                $get("myDiv").innerHTML = result.markup;
                eval(result.script);
            }
        </script>
    </telerik:RadScriptBlock>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="ScriptManager1" EnablePageMethods="true">
    </asp:ScriptManager>
    <div>
                     
        <asp:Button runat="server" ID="B1" Text="GO!" OnClientClick="return getGrid();"/>
        
        <div id="myDiv">
            <my:control runat="server" ID="control" />
        </div>
                
    </div>
    </form>
</body>
</html>
