Hello , I am using DNN version 07.03.03 (118) in my application. I have one user control & created its module. I have used that module in a page. Now I have to call Page Method from that user control. But while calling the function I am receiving an javascript error. User control path : DesktopModules\ProductList\ProductList.ascx Function in user control: [System.Web.Services.WebMethod] public static string Hello() { try { string returnString = "Hello"; return returnString; } catch (Exception ex) { throw ex.InnerException; } } Javascript function: <script type="text/javascript"> <br /> $(document).ready(function () { <br /> Hello(); <br /> }); <br /> function Hello() { <br /> $(function () { <br /> $.ajax({ <br /> type: 'POST', <br /> url: '/ProductList.ascx/Hello', <br /> data: "{}", <br /> async: false, <br /> success: function (response) { <br /> alert("Success"); <br /> }, <br /> error: function (xhr, ajaxOptions, thrownError) { <br /> if (xhr.responseJSON.Message != null) <br /> alert(xhr.responseJSON.Message); <br /> else <br /> alert(String(thrownError)); <br /> } <br /> }); <br /> }); <br /> } <br /> </script> <br /> <br /> <br /> |