include file variables

is there a way to use a variable in an include file statement

example: url = ...default.aspx?location=admin.aspx"
<!--#include file="inc_header.aspx"-->(menu included here)
the next include controls content.  Page is always default.aspx
<!--#include file="VARIABLE GOES HERE"-->

<!--#include file="inc_footer.aspx"-->
dale4brumbaughAsked:
Who is Participating?
 
vs1784Connect With a Mentor Commented:
Sure,

Check this

http://www.aspdev.org/articles/asp-server.execute/

Hope it helps,

Thanks
0
 
vs1784Commented:
You can not include a variable in include file name.

But other way to do this is use Server.Execute

Server.Execute the file name you want and Respose.Write the output.

Hope this helps,

Thanks
0
 
dale4brumbaughAuthor Commented:
could you show an example of this
0
All Courses

From novice to tech pro — start learning today.