Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web server variable access from client

Status
Not open for further replies.

dg043

Programmer
Apr 22, 2002
52
GB
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)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top