<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { function calldata() { alert('webmethod'); $.ajax({ type: "POST", url: '<%=ResolveUrl("~/MainMdi.master/HelloWorld")%>' , contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { alert(msg.d); }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); return false; } calldata(); }); </script>
Error 404 means Page not found.
You need to check the Ajax url is correct or not.
url: '../doctor/consultation/Diagnosis.aspx/BindData',
Or use ResolveUrl in the Url like this
url: '<%=ResolveUrl("~/Service.asmx/GetCustomers") %>',
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.