Couldnt able to call my service at client side

VopangepECege

New Member
Can anyone help me on this to find where am going wrong,This is my service(.asmx file),\[code\][WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] [System.Web.Script.Services.ScriptService] public class GroupService : System.Web.Services.WebService { [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public void InsertNewGroup(string GroupName, bool GroupStatus) { try { Command cmd = new Command(Constants.commonAPIUI); cmd.CommandText = Constants.InsertNewGroup; cmd.CommandType = CommandType.StoredProcedure; cmd.ExecuteNonQuery(); } catch (Exception) { throw; } }\[/code\]I am calling the service in client script as show below,\[code\]<script type="text/javascript"> function CallService() { groupname = document.getElementById('txtName').value; groupstatus = document.getElementById('txtActive').value; alert(groupname); alert(groupstatus); Service.GroupService.InsertNewGroup(groupname, groupstatus, Callback); } function Callback(result) { alert(result); } </script>\[/code\]registered the service like below in the aspx page,\[code\] <asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="Service/GroupService.asmx" /> </Services> </asp:ScriptManager> \[/code\]when am running I find the following error on clicking the button, the service is not called. Can anyone please help me on this pain..
jlbfJ.png
 
Back
Top