Search the Community
Showing results for tags 'asmx'.
-
Dear friends, Basic need -------------- I need to call asmx webservice from javascript function. onbuttonclick, i am actually calling that javascript function. line with high size font is the problem area. please help guys working from past 5 days on this part WebService Registration with aspx page--------------------------------------------------- <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true"> <Services> <asp:ServiceReference Path="~/dataPreExist.asmx"/> </Services> </asp:ToolkitScriptManager> WEBSERVICE ------------------ <ToolboxItem(False)> _ Public Class dataPreExist Inherits System.Web.Services.WebService <WebMethod()> _ Public Function EnqPreExistOrNot(ByVal paraCcn As String, ByVal paraPcode As String) As Boolean Dim strsql6 As New StringBuilder Dim localdt6 As New DataTable ' ccn = "DJ079" ' party = "04BSPT0066" With strsql6 .Append("select * from complaintmastercrm where ccncd='" & paraCcn & "' and partycd='" & paraPcode & "'") End With localdt6 = CommonDb.ReturnDataTable(strsql6.ToString, "CRM") If localdt6.Rows.Count > 0 Then EnqPreExistOrNot = True MsgBox("pre Enquiry Exist") MsgBox("Pre Enquiry not exist") Else EnqPreExistOrNot = False End If End Function End Class End Namespace Javascript Function ------------------------- function webServiceCall() { var paraCcn; //var paraPartyCd; var paraPcode; //alert('hello last') paraCcn = document.getElementById("<%=lblCcn.clientID%>").innerHTML; paraPcode = document.getElementById("<%=hdnParty.clientID%>").value; paraPcode = paraPcode.replace(/,s*$/, ""); var a = new namespace1.dataPreExist(); //not working block a.EnqPreExistOrNot(paraCcn, paraPcode, OnSucessorFail); //not working block } function OnSucessorFail() { debugger; var proceed; proceed = confirm("Enquiry already Generated for this Machine and Cost Center"); if (proceed == true) { return true; } else { return false; } }
- 6 replies
-
- javascript
- asp.net
-
(and 2 more)
Tagged with: