access a classic asp variable from within a webservice

K

Kiran

Here is the situation :

***************************
parent.asp
***************************
<!-- #INCLUDE FILE="../includes/inc_html.asp" -->

Dim iVar
iVar = 20

Dim sText
sText = GetHtml()
***************************
inc_html.asp
*********************
function GetHtml()
select case iVar
case 10
GetHtml = "This is the output for you item # 10"
case 20
GetHtml = "You opted for item # 20"
case 30
GetHtml = "# 30 seems to be pretty expensive"
end select

*******************************************************
My job is to convert inc_html.asp to an asp.net webservice.
I tested calling the web method of the web service from .asp and it all works.

My question is., is there a way to access the value of iVar(declared in the
parent asp)
from within the webservice without passing the iVar to the webmethod as a
parameter.
Or create a property or something in the Webmethod ? just a thought
 
S

Scott M.

My question is., is there a way to access the value of iVar(declared in
the
parent asp)
from within the webservice without passing the iVar to the webmethod as a
parameter.

No. WebServices are not statefull objects so you must give them what they
need to do their work and for you to get back your result.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top