ASP.NET Syntax Global.asax Syntax
Insert the raw contents of a specified file anywhere within an ASP.NET application file.
<!-- #include pathtype = filename -->
- pathtype
- The type of the filename path. The path type can be one of the following:
- File - The file name is a relative path from the directory containing the file with the #include directive. The included file can be in the same directory or in a subdirectory; it cannot be in a directory above the file with the #include directive.
- Virtual - The file name is a full virtual path from a virtual directory on your Web site.
- filename
- The name of the file to be included. filename must contain the file name extension, and you must enclose the file name in quotation marks ( " ).
The included file is processed before any dynamic code is executed. The #include tag must use HTML/XML comment delimiters so as not to be interpreted as static text.
The below code snippet demonstrates including a file named myHeader.inc in a Web Forms page.
<!-- #include File = "myHeader.inc" -->
ASP.NET Applications