473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass Parameters to <!-- #Include File="file.asp" -->

What is the workaround of passign a parameter to any included asp
file:

<!-- #Include File="file.asp" -->

This obviously does not work:

<!-- #Include File="file.asp? id=123" -->

Thank you

Apr 3 '07 #1
10 25425
Server.Execute Method

The Execute method calls an .asp file, and processes it as if it were part of the calling ASP script. The Execute method is similar
to a procedure call in many programming languages.

http://msdn2.microsoft.com/en-us/library/ms525849.aspx

<vu******@gmail .comwrote in message news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
What is the workaround of passign a parameter to any included asp
file:

<!-- #Include File="file.asp" -->

This obviously does not work:

<!-- #Include File="file.asp? id=123" -->

Thank you

Apr 3 '07 #2
On Apr 3, 12:45 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot comwrote:
Server.Execute Method

The Execute method calls an .asp file, and processes it as if it were part of the calling ASP script. The Execute method is similar
to a procedure call in many programming languages.

http://msdn2.microsoft.com/en-us/library/ms525849.aspx

<vunet...@gmail .comwrote in messagenews:11* *************** ******@n76g2000 hsh.googlegroup s.com...
What is the workaround of passign a parameter to any included asp
file:
<!-- #Include File="file.asp" -->
This obviously does not work:
<!-- #Include File="file.asp? id=123" -->
Thank you
so will this work?: Server.Execute myfile.asp?id=1 23

Apr 3 '07 #3
no, you don't need to pass anything through.

The external file is processes information as though it is part of the originating file.

Therefore any values in the originating file (id=123) can be used by the external file.
Apr 3 '07 #4
On Apr 3, 1:22 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot
comwrote:
no, you don't need to pass anything through.

The external file is processes information as though it is part of the originating file.

Therefore any values in the originating file (id=123) can be used by the external file.
Do you say I cannot use params at all?

Apr 3 '07 #5
params aren't required with this solution, please read the instructions for usage at the site link provided.

<vu******@gmail .comwrote in message news:11******** **************@ b75g2000hsg.goo glegroups.com.. .
On Apr 3, 1:22 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot
comwrote:
>no, you don't need to pass anything through.

The external file is processes information as though it is part of the originating file.

Therefore any values in the originating file (id=123) can be used by the external file.

Do you say I cannot use params at all?

Apr 3 '07 #6

<vu******@gmail .comwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
What is the workaround of passign a parameter to any included asp
file:

<!-- #Include File="file.asp" -->

This obviously does not work:

<!-- #Include File="file.asp? id=123" -->

Thank you
Is the file being included expecting to be able to read parameters from the
querystring?
Can it be independantly visited by the client or is it always intended to be
an include?
Apr 3 '07 #7
On Apr 3, 4:15 pm, "Anthony Jones" <A...@yadayaday ada.comwrote:
<vunet...@gmail .comwrote in message

news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
What is the workaround of passign a parameter to any included asp
file:
<!-- #Include File="file.asp" -->
This obviously does not work:
<!-- #Include File="file.asp? id=123" -->
Thank you

Is the file being included expecting to be able to read parameters from the
querystring?
Can it be independantly visited by the client or is it always intended to be
an include?
i've decided using this strategy:
dim id : id=123
<!-- #Include File="file.asp" -->
id=321
<!-- #Include File="file.asp" -->

where file.asp will assign id value to appropriate object.
yes, i do need to use some kind of include method

Apr 3 '07 #8
vu******@gmail. com wrote:
i've decided using this strategy:
dim id : id=123
<!-- #Include File="file.asp" -->
id=321
<!-- #Include File="file.asp" -->

where file.asp will assign id value to appropriate object.
yes, i do need to use some kind of include method
This is an especially inefficient way to use include files. You would be
better served by putting the applicable parts of the include into a Sub or
Function, then call them with the respective IDs:

[------- Begin file.asp ----------]
Sub DoStuff(id)
{ your included code goes here }
End Sub
[-------- End file.asp -----------]

As long as everything in the include is in functions or subroutines, you can
place it anywhere in your document and make the calls where you need them.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Apr 3 '07 #9
On Apr 3, 6:06 pm, "Dave Anderson" <NYRUMTPEL...@s pammotel.comwro te:
vunet...@gmail. com wrote:
i've decided using this strategy:
dim id : id=123
<!-- #Include File="file.asp" -->
id=321
<!-- #Include File="file.asp" -->
where file.asp will assign id value to appropriate object.
yes, i do need to use some kind of include method

This is an especially inefficient way to use include files. You would be
better served by putting the applicable parts of the include into a Sub or
Function, then call them with the respective IDs:

[------- Begin file.asp ----------]
Sub DoStuff(id)
{ your included code goes here }
End Sub
[-------- End file.asp -----------]

As long as everything in the include is in functions or subroutines, you can
place it anywhere in your document and make the calls where you need them.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
so if I have 4 pages I normally "include" now, you suggest to combine
them into one page each within a sub? that will be a loooong code
page. what is "inefficien t" about my method above? i understand that
may not be the best way, but i want to know how it make things worse.

Apr 4 '07 #10

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

Similar topics

0
1879
by: Scott Townsend | last post by:
I'd like to pass parameters to a local Application from a webpage. something like: <a href="file:///C:/Program%20Files/myapp/myapp.exe%20-custno:mycustno%20-quote no:12345%20-item:12345">test with params</a></p> Though it does not like it. If I leave off the Parameters it works fine.
13
26990
by: Al Franz | last post by:
Anyone understand how to pass parameters to a JavaScript. If anyone finds this easy to do maybe they could take a look at my short script on this page and show me how it needs to be changed. http://franz.org/java.htm Thanks for any help.
5
3960
by: Ben | last post by:
Hi I am using a User Control which is referenced by an ASPX page. How can I pass a string parameter to the user control, from the base ASPX page. Thanks Ben
6
3575
by: Woody Splawn | last post by:
I am using SQL Server 2000 as a back-end to a VS.net Client/Server app. In a certain report I use a view as part of the query spec. For the view, at present, I am querying for all the records in the table. But I am wondering if there is a way, at runtime, to pass values to the View (like start date and end date) so that I don't have to return every record in the table of my view. If I can't pass a parameter, perhaps I can create a view,...
3
2121
by: Wang Xiaoning | last post by:
I have an customerdetail.xsl sheet ---------------------------------------------------------- <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="customer_number"></xsl:param>
3
8219
by: Joseph Lu | last post by:
Hi, all I have a stored procedure created in SQL Server like the following lines. // stored proceudre code starts here CREATE PROCEDURE sp_insertdata @strdata varchar(250) , @rsult BIT OUTPUT , @erridx CHAR(7) OUTPUT
0
2104
by: raghuraman_ace | last post by:
Hi i have started a webservice wich has a webmethod with parameters using literal encoding & encoded encoding . The webservice is compiled successfully . But i don know how to pass the parameters that satisfy these encodings . My web method is ---------------------------------------------
1
1928
by: Hexman | last post by:
Hello All, I have a new challenge. I've created a Crystal Report (version 10) and saved the file. Now from my program I want to print it to an Adobe PDF file. My question is: How do I pass parameters thru Crystal to modify printer behavior? For Instance: 1. Pass it a path & filename to save to. eg; "C:\ReportDist\R100102-060902.pdf" (included the date in the filename) 2. Tell the Adobe PDF printer to overwrite an existing file if...
0
2110
by: PriyaManasarovar | last post by:
Can someone help how to pass parameters to a crystal report using a Crystal report object? I am using a console application & hence crystal report viewer cannot be used. And i need to pass the parameter through a batch file at run time? I have included a code here to pass parameters, but its giving invalid index error when i try to pass parameters: report1 = app.OpenReport(sfilename) crxDatabase = report1.Database ...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5381
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
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
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.