<body onunload="CallMyEnd()"> <script type="text/javascript" language="javascript"> function CallMyEnd() { // call server side method alert(PageMethods.GetName()); } </script> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"/> ------------------------- and my methods CS. [WebMethod] public static string GetName() { return "1111111"; } the explorer return alert undefined what is the error in this code ? i try the script on head and now in body the same error ?
ahmed eldeghedy