Example of Include File In ASP
Asp / / July 04, 2021
The #include directive in ASP is used to include other files, eg. headers, footers, side menus to include on multiple pages, and thus only update the included page to update everything at once, and not have to update file by file.
You can insert the content one HTML or ASP page into another ASP page before the server executes it, using the #include directive.
Example of Using Include in ASP
Code: #include file = "frases.inc" #include file = "time.asp"Famous Phrases:
The time is:
In this example we include phrases.inc and time.asp
The content of phrases.inc is
Code:"I only know that I know nothing"
And the content of time.asp is
Code:Response. Write (Time)
%>
And the final result in the browser already executed by the ASP engine will be
Code: "I only know that I know nothing" {CURRENT TIME}Famous Phrases:
The time is: