Hello Mate,
The webservice method is not getting called . COULD U PLEASE HELP ME ON THIS PROBLEM?
First of all i have a folder called "Masters" in my project.
In that folder i am having two webpages ( one as master page and other as a pop up page) and a webservice.htc file which i had downloaded from the internet.
I have specified the htc file (which is nothing but webservice's behavior file) in webpage's source code as
<
div id="service" style="behavior:url(webservice.htc)"></div>
i have a webservice file and also a jscript file.
in the jscript file i have coded as
(in this i have specified "FillTable" which is nothing but the webservice method. it is used to fill a datatable from the parameters passed and stored in a session variable. after that the succeededcall back function will refresh the parent form in which i will fill a datagrid using the datatable in the session variable) function init()
{
service.useService("Webservices/GridTasks.asmx?WSDL","GridTasks");
}
function CreateAndFillTable()
{
alert(
"in create and fill table");
var
strtxtCust_cp_code = document.getElementById("Table1_txtCust_cp_code").value;
var
strtxtCust_cp_name = document.getElementById("Table1_txtCust_cp_name").value;
var
strtxtCust_cp_desig = document.getElementById("Table1_txtCust_cp_desig").value;
var
strtxtcust_cp_ph_no = document.getElementById("Table1_txtCust_cp_phone_no").value;
var
strtxtCust_cp_mobile_no = document.getElementById("Table1_txtCust_cp_mobile_no").value;
var
strtxtCust_cp_email_id = document.getElementById("Table1_txtCust_cp_email").value;var strtxtCust_cp_rmks = document.getElementById("Table1_txtCust_cp_rmks").value;
init();
var iCallID; iCallID = service.GridTasks.callService(SucceededCallback,"FillTable",strtxtCust_cp_code,strtxtCust_cp_name,strtxtCust_cp_desig,strtxtcust_cp_ph_no,strtxtCust_cp_mobile_no,strtxtCust_cp_email_id,strtxtCust_cp_rmks);
}
function SucceededCallback()
{
opener.document.forms["aspnetForm"].submit();
window.close();
}
WebService method:
<WebMethod(True)> _
Public Sub FillTable(ByVal strtxtCust_cp_code As String, ByVal strtxtCust_cp_name As String, ByVal strtxtCust_cp_desig As String, ByVal strtxtcust_cp_ph_no As String, ByVal strtxtCust_cp_mobile_no As String, ByVal strtxtCust_cp_email_id As String, ByVal strtxtCust_cp_rmks As String)MsgBox("filltable/webservices") Dim Table6 As New DataTable
TryDim Delete As New DataColumn Delete.ColumnName = "Delete"
Dim Modify As New DataColumnModify.ColumnName = "Modify"
Dim Code As New DataColumn Code.ColumnName = "Code"
Dim Name As New DataColumn Name.ColumnName = "Name"
Dim Designation As New DataColumn Designation.ColumnName = "Designation"
Dim Phone As New DataColumn Phone.ColumnName = "Phone"
Dim Mobile As New DataColumn Mobile.ColumnName = "Mobile"
Dim Email As New DataColumn Email.ColumnName = "Email"
Dim Remarks As New DataColumnRemarks.ColumnName = "Remarks"
Table6.Columns.Add(Delete)
Table6.Columns.Add(Modify)
Table6.Columns.Add(Code)
Table6.Columns.Add(Name)
Table6.Columns.Add(Designation)
Table6.Columns.Add(Phone)
Table6.Columns.Add(Mobile)
Table6.Columns.Add(Email)
Table6.Columns.Add(Remarks)
If Session("CUST_Info") Is Nothing Then
Table6.Rows.Add(0)
Table6.Rows(0).Item(
"Delete") = "Delete.png"
Table6.Rows(0).Item(
"Modify") = "Modify.png"Table6.Rows(0).Item("Code") = strtxtCust_cp_code
Table6.Rows(0).Item(
"Name") = strtxtCust_cp_nameTable6.Rows(0).Item("Designation") = strtxtCust_cp_desig
Table6.Rows(0).Item(
"Phone") = strtxtcust_cp_ph_noTable6.Rows(0).Item("Mobile") = strtxtCust_cp_mobile_no
Table6.Rows(0).Item(
"Email") = strtxtCust_cp_email_idTable6.Rows(0).Item("Remarks") = strtxtCust_cp_rmks
ElseTable6 = Session("CUST_Info")
Dim i As Integer
i = Table6.Rows.Count
Table6.Rows.Add(i)
Table6.Rows(i).Item(
"Delete") = "Delete.png"
Table6.Rows(i).Item(
"Modify") = "Modify.png"Table6.Rows(i).Item("CODE") = strtxtCust_cp_code
Table6.Rows(i).Item(
"Name") = strtxtCust_cp_nameTable6.Rows(i).Item("Designation") = strtxtCust_cp_desig
Table6.Rows(i).Item(
"Phone") = strtxtcust_cp_ph_noTable6.Rows(i).Item("Mobile") = strtxtCust_cp_mobile_no
Table6.Rows(i).Item(
"Email") = strtxtCust_cp_email_idTable6.Rows(i).Item("Remarks") = strtxtCust_cp_rmks
End IfSession("CUST_Info") = Table6Catch ex As Exception
MsgBox(ex.ToString)
End TryMsgBox("filltable/webservices over")
End Sub