0

I have two .asp pages(abc1.asp,abc2.asp). I want to call function from abc2.asp in abc1.asp pages.How to do it?

1
  • If you can't create new file and put the function there as suggested in the answer one other way is reading abc2.asp using FileSystemObject, extract the function as raw string and use Execute() method of VBScript to make it part of the context in abc1.asp as well. Dirty but it would work. If interested let me know and I'll come with sample code, however note it's NOT good practice. Commented Feb 25, 2013 at 8:16

1 Answer 1

3

Create a third file, maybe called functions.asp - put your functions in that then include it in abc1.asp and abc2.asp by means of an include file statement - see below

<!--#include file="functions.asp"-->
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.