Traditional #include is nit really a good option for the OO nature of
asp.net. The correct approach is to use user controls, but they can be very
simple to implement.
Add this line to the top of your aspx page
includeme.ascx is the equivalent of the old include file with your HTML
etc, in my case it is a navigation menu
<%@ Register TagPrefix="myProject" TagName="includedthing"
Src="includeme.ascx" %>
To position the include file in the page add the line below to you ASPX
page
<myProject:menu:includedthing ID="myfirstinclude" runat="server" />
--
Regards
John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------
"Bari" <ba****@hotmail.com> wrote in message
news:03****************************@phx.gbl...
I'm trying to find out how to INCLUDE a file (text or html
etc) into my ASPX page.
I don't want to know how to create a user control etc just
a quick simple example.
Looking for something similar to the old fashioned ASP
include <!--#include file="time.inc"--> but a .NET version.