473,384 Members | 1,854 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,384 software developers and data experts.

Parent functions in Server.Execute

GazMathias
228 Expert 128KB
Anyone know of a way to allow server.executed pages to see functions in the calling parent (which themselves are #included)?

The only things I can think of are

a: To #include the functions in each server.executed page.
or
b: To read the file into a string, insert the #include functions line into the string, save the string as a temp file and server.execute the temp file.

I really don't want to do either of those.

I can not use #include instead of server.execute as the included page name is read from a db, and so must be dynamic.

Gaz
May 3 '09 #1
4 2882
jhardman
3,406 Expert 2GB
@GazMathias
You're kind of pushing the edge of what classic ASP can accomplish, at times like this I tend to say "use a web service". Hope this helps.

Jared
May 11 '09 #2
GazMathias
228 Expert 128KB
You're kind of pushing the edge of what classic ASP can accomplish, at times like this I tend to say "use a web service". Hope this helps.
Thanks for that Jared.

I've kind of reached that eureka moment I guess every programmer does at some point when they realise that they keep rewriting the same code over and over again and so start to write libraries to do it for them (particularly with regard to database access and file / directory operations).

I simply wanted a way to make all of my libraries available to all of the pages in my site while being lazy and not have to update them all manually. I experimented with method b (which does work though obviously requires a redirect) but settled on method a for the simple reason that I had to update the pages to use the libraries anyway.

This site is now smaller, cleaner, faster and a heck of a lot easier to develop.

Gaz.
May 11 '09 #3
I wrote this a while back and it has opened up Classic ASP for me in a whole new way. It will do what you are after:

Real Dynamic Includes With Classic ASP

Any problems just let me know

Reiss
May 17 '09 #4
jhardman
3,406 Expert 2GB
@atwork8
That's pretty cool! I wish I'd thought of that 5 years ago. Thanks for posting.

Jared
May 18 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Dave Hammond | last post by:
In document "A.html" I have defined a function and within the document body have included an IFRAME element who's source is document "B.html". In document "B.html" I am trying to call the function...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
2
by: MLibby | last post by:
How can an IFrame's aspx page force a server-side redirect on its parent page? Typically, an IFrame's client-side javascript specifies '_top' to change the parent page... ...
2
by: Sheryl Landon | last post by:
Hi, I'm having a similar issue as the poster Mike whose message I copied below... I have a page with an iframe... when I discover that the session state is no longer valid in the page inside the...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
7
by: msxkim | last post by:
How to execute functions in the parent class first and then functions in the child class? For example, I have a parent class with functions 'ONE' and 'TWO' and child class has a function 'THREE'. ...
1
by: Eric | last post by:
Consider the following: class ParentClass { public: void FunctionOne( void ); protected: void FunctionTwo( void ); private: void FunctionThree( void );
3
by: Jeremy | last post by:
If we have an iframe loaded from the same domain as the parent document, how can we (is it possible) to execute a function on the parent document's page? e.g. 1) On parent page:...
4
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.