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
Scott M. - 21 Oct 2006 15:19 GMT
> 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.