943,580 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 1103
  • ASP RSS
Oct 14th, 2008
0

Server Side File Inclusion

Expand Post »
I have 3 files containing classes, let's say - A, B and C. B and C both contain the file A as they are subclasses of A, using the "#include file " directive. I am facing a problem if a page contains both B and C, it is saying 'Class A: name redefined'.

This is obviously happening because both B & C have copies of A, and they are clashing. Is there a way to specify to include only one copy of a file for an ASP page ? Something like the 'require_once' directive of PHP ?
Similar Threads
Reputation Points: 20
Solved Threads: 10
Junior Poster
aparnesh is offline Offline
193 posts
since Jul 2005
Oct 25th, 2008
0

Re: Server Side File Inclusion

Hi,
I understood that you have 3 files, which contain some identical data. If you redefine classes, then you get an error. There is no need to have copies of classes, if you wish to include all three files. You should only have copies of the classes, when you include only one file.

Good luck!
Reputation Points: 11
Solved Threads: 7
Junior Poster in Training
Baradaran is offline Offline
88 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Change language of content according to country
Next Thread in ASP Forum Timeline: Accessing IIS site





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC