The online FAQ database contains hundreds of answers to frequently asked questions, articles on using our web server applications and other related technologies, and resolutions to common problems. If you are seeing an error message, be sure to try searching on the error message or error number that you are seeing.

Question I use AdMentor (ASP-based ad-management - no html support) and would also like to use an include file on my pages. I've tried running it as an include and changing the Template file to an ASP file, but no luck. Am I doing something wrong or is it not possble (includes within includes)?

Answer The template file is just a static HTML file. So, it is not possible to do server side includes in the template file. This is even more the case since this file is not directly served by IIS, but by the web server application running on IIS. So, if you are using xcAuction, then xcAuction is what is delivering the template file to the user's browser, not the IIS web server. So web server directives embedded in the HTML file cannot be used. Changing the name or extension on the template file will not have any effect at all.

Note: The following information is only for the benefit of advanced users experienced with writing their own ASP code. These are not supported changes and any changes you make are on your own. Assistance with making these types of changes to the application is not available via product technical support, and is only available via our consultation services.

If you are experienced with making changes or writing your own ASP code, then you can easily modify the application to do what you are looking for. In the application's main library file, is a function used throughout the application to create the template. The main library file is named according to the application being used. In xcDirectory, the filename is xcDirLib.asp, in xcAuction it it APLib.asp. Within the library file is a function that you would need to modify. Locate the OutputTemplate function. Within that function, you will need to dynamically perform the changes to the template as it is being served to the client.

To do this in a manner consistent with how the application is already working, you might do something like put a macro code like %MYBANNER% in the template file. Then in the OutputTemplate function, you would modify the function as shown below. Then you create a function called MyBannerFunction that would return your banner.


sTemp = "" & psStream
sTemp = Replace(sTemp, "%MYBANNER%", MyBannerFunction)