I am trying to store a variable in a Web Service class created with ASP.NET. The variable is declared as global to the web service class and it has an accesssor method.
I want to set this variable in a method of the web service and then return it when the accessor method is called. The code that my client web page is using is:
number = ws.InsertP11(gasday, Me.cmbReasons.SelectedIndex, Session("user"))
If number = "" Then
Session("Error Source") = "P11.aspx"
Session("Error Description") = "Add P11 Failed: " & ws.SQLerror
Response.Redirect("Error.aspx")
Exit Sub
End if
ws represents to my web service and the InsertP11 method of it sets a variable internal to the web service (I have stepped through the code to confirm this is true). The SQLerror method of it is just an accessor to this variable but when I step into this method, the variable is nothing. Any ideas??
Dan Griffiths
Software Analyst
National Grid Transco (NGT)
I want to set this variable in a method of the web service and then return it when the accessor method is called. The code that my client web page is using is:
number = ws.InsertP11(gasday, Me.cmbReasons.SelectedIndex, Session("user"))
If number = "" Then
Session("Error Source") = "P11.aspx"
Session("Error Description") = "Add P11 Failed: " & ws.SQLerror
Response.Redirect("Error.aspx")
Exit Sub
End if
ws represents to my web service and the InsertP11 method of it sets a variable internal to the web service (I have stepped through the code to confirm this is true). The SQLerror method of it is just an accessor to this variable but when I step into this method, the variable is nothing. Any ideas??
Dan Griffiths
Software Analyst
National Grid Transco (NGT)