How To Dynamically Include Files in ASP.NET (306575)
The information in this article applies to:
- Microsoft ASP.NET (included with the .NET Framework) 1.0
- Microsoft Visual Basic .NET (2002)
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft Visual Basic .NET (2003)
This article was previously published under Q306575 For additional information, click the article
numbers below to view the articles in the Microsoft Knowledge Base: 192144 How To Dynamically Include Files in Active Server Pages
IN THIS TASKSUMMARY This article demonstrates how to dynamically include HTML
and client-side scripts in .aspx pages. Because ASP.NET applications
are compiled and run before they are sent to the client, you cannot use a
variable in place of a file name in a server-side include file (such as <!--
#include PathType = FileName -->"). However, you can use the Response or StreamReader object to write the include file to the HTTP content
stream. This article demonstrates how to create an .aspx page that
reads a file with static HTML and/or client-side script code and writes the
file's content to the browser. back to the topREFERENCESFor additional information, click the article numbers
below to view the articles in the Microsoft Knowledge Base: 304427 How To Do Basic File I/O in Visual Basic .NET
304430 How To Do Basic File I/O in Visual C# .NET
back to the top
Modification Type: | Minor | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbHOWTOmaster KB306575 kbAudDeveloper |
---|
|