Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2006

Tip: Looking for answers? Try searching our database.

access a classic asp variable from within a webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kiran - 21 Oct 2006 01:42 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.