473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 5643
Example:

Form1.asp

<input type=text name=myvar value=<%myvariable%>>

Form2.asp

myvar = Request.Form("myvariable")

--
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**************@tk2msftngp13.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**************@cpmsftngxa07.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.comcast.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
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...
3
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...
4
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...
1
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...
2
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...
2
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...
1
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...
2
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: ...
9
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)....
1
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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.