473,545 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server.Execute

Hi

I am calling Server.Execute( "2.asp") from "1.asp" and expect to have
application variables declared in "1.asp" available to the script code in
"2.asp", at least this is what the documentations says, but it doesn't work.
I am declaring the variables in "1.asp" as public (VBScript). Does anyone
have an idea if this is supposed to work?

Many thanks

Elie Grouchko
Jul 19 '05 #1
6 5648
Example:

Form1.asp

<input type=text name=myvar value=<%myvaria ble%>>

Form2.asp

myvar = Request.Form("m yvariable")

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Elie Grouchko <el**@grouchko. com> wrote in message
news:#K******** ******@tk2msftn gp13.phx.gbl...
Hi

I am calling Server.Execute( "2.asp") from "1.asp" and expect to have
application variables declared in "1.asp" available to the script code in
"2.asp", at least this is what the documentations says, but it doesn't work. I am declaring the variables in "1.asp" as public (VBScript). Does anyone
have an idea if this is supposed to work?

Many thanks

Elie Grouchko

Jul 19 '05 #2
Hello Elie,

Thanks for posting in the group.

Based on my understanding, now the question is: You use Server.Execute to
execute another asp file (2.asp) in 1.asp. However, one variable is not
accessable in 2.asp. Please correct me if I have misunderstood the probelm.

When we use the Server.Transfer and Server.Execute methods, the ASP
intrinsic objects are transferred and maintained. This includes Request,
Response, Server, Session, and Application. However, if you define a
variable in 1.asp, it won't be visible in 2.asp.

Steven has introduced a good method. You could persist value in Request
object. Also, you could store the value in session so that it could be
accessable in 2.asp.

Does that answer your question? If there is any unclear on it, please feel
free to post in the group.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 19 '05 #3
Hi Yanhong

Thanks for your answer.

I admit that my question was not very clear. I was referring to VBScript
variables declared in 1.asp, for example:

1.asp

option explicit
public i
...

2.asp

option explicit
i = i + 1
...

This method doesn't work but I did found a workaround by using the session
object (although sensitive to cookie settings) and you mentioned this method
as well.

Many thanks

Elie Grouchko
"Yan-Hong Huang[MSFT]" <yh*****@online .microsoft.com> wrote in message
news:8s******** ******@cpmsftng xa07.phx.gbl...
Hello Elie,

Thanks for posting in the group.

Based on my understanding, now the question is: You use Server.Execute to
execute another asp file (2.asp) in 1.asp. However, one variable is not
accessable in 2.asp. Please correct me if I have misunderstood the probelm.
When we use the Server.Transfer and Server.Execute methods, the ASP
intrinsic objects are transferred and maintained. This includes Request,
Response, Server, Session, and Application. However, if you define a
variable in 1.asp, it won't be visible in 2.asp.

Steven has introduced a good method. You could persist value in Request
object. Also, you could store the value in session so that it could be
accessable in 2.asp.

Does that answer your question? If there is any unclear on it, please feel
free to post in the group.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 19 '05 #4
Hi Elie,

You are welcome. :) If there is anything unclear, please feel free to post
new messages in the group.

Thanks for participating the community.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 19 '05 #5

You can not declare a variable in one page, and use it in a page you
are executing ... think of the page being executed as it's own little
world ... the only thing it has available to it is .QueryString .Form
..Cookies .Sessions ... but no variables.

I also want to add that creating a Cookie or session in 1.asp is not
always reliable in passing data to 2.asp

Brynn
www.coolpier.com

On Mon, 29 Dec 2003 01:33:55 +1300, "Elie Grouchko"
<el**@grouchko. com> wrote:
Hi

I am calling Server.Execute( "2.asp") from "1.asp" and expect to have
application variables declared in "1.asp" available to the script code in
"2.asp", at least this is what the documentations says, but it doesn't work.
I am declaring the variables in "1.asp" as public (VBScript). Does anyone
have an idea if this is supposed to work?

Many thanks

Elie Grouchko


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
Jul 19 '05 #6
Thanks

"Brynn" <z@z.com> wrote in message
news:40******** *******@news.co mcast.giganews. com...

You can not declare a variable in one page, and use it in a page you
are executing ... think of the page being executed as it's own little
world ... the only thing it has available to it is .QueryString .Form
.Cookies .Sessions ... but no variables.

I also want to add that creating a Cookie or session in 1.asp is not
always reliable in passing data to 2.asp

Brynn
www.coolpier.com

On Mon, 29 Dec 2003 01:33:55 +1300, "Elie Grouchko"
<el**@grouchko. com> wrote:
Hi

I am calling Server.Execute( "2.asp") from "1.asp" and expect to have
application variables declared in "1.asp" available to the script code in
"2.asp", at least this is what the documentations says, but it doesn't work.I am declaring the variables in "1.asp" as public (VBScript). Does anyone
have an idea if this is supposed to work?

Many thanks

Elie Grouchko
I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!
Brynn
www.coolpier.com

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5281
by: PiGei | last post by:
hi all, I'm trying to use server.execute statement to include in an asp page another asp page with a parameter. That's because I've a parametric query in the second asp page and I have to pass the value <% Server.Execute("result.asp?key=2") %> I can't do it. That's the error message I get:
3
6859
by: Chris | last post by:
I have yet to understand or get a response on the issue I'm having. I'm taking an asp web application and migrating it from Windows 2K to 2003. I have the new website location (2003) settings correct, i.e. enable parent paths, etc. and still get these errors: Server object error 'ASP 0228 : 80004005' Server.Execute Error...
4
6447
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to define the servername / hostname in my Perl Progrem.. Here is the code:
1
1659
by: Chris | last post by:
Hi, 1) is it possible for an asp-button control to execute client-side scripting as well ? 2) and for an HTML-server control ? I would like to execute client-side code , and then execute server-side code. Thnx
2
3321
by: Dune | last post by:
I'm trying to execute an aspx page by calling Server.Execute. The aspx page I'm trying to execute is in a different web app from the aspx page containing the Server.Execute statement. A slightly clearer explanation... Page1 exists in WebApp1. In the code-behind of Page2 in WebApp2, I have put Server.Execute("Path to Page1 in WebApp1"). ...
2
1957
by: Chuck Haeberle | last post by:
We have a page which sends a copy of itself via email to customers. To enable this, the page calls Server.Execute on itself into a text stream and strips its own output down to HTML presentable to the customer. In our Test environment (but not our DEV or Local envs) we are experience an ASP.NET lockup. The WHOLE asp.net architecture...
1
5713
by: teddysnips | last post by:
Below is the script of a Job called "eFIMS_SendEmail" that I wish to run. The intention is that every day of the week the job will execute a SPROC at timed intervals. For example, the SundayRun schedule will run once every 1 hours from 00:30:00 to 23:59:59 However, the clients have stated that they want an interface to this to enable them...
2
3963
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: D:\original\CaseStudy-2-5\CaseStudy\Day02\exercise>asant database Buildfile: build.xml env-user: prop-user: set-user:
9
4332
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case). The browser then makes a new request to the server to redirect itself to abcd.asp after which the user gets redirected to abcd.asp. But in case of...
1
2224
by: Jez | last post by:
Can anyone help me with this ?? ASP on Windows 2003 filename = "file.asp?id=" & ID Server.Execute("filename") This doesn't work... Any ideas ? Thanks
0
7692
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
744
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.