As far as I know ASP.NET does not use Includes (like ASP). Instead it uses something called User Controls. These are created within separate files (with a .ascx extension) and then imported into the .aspx file. User Controls cannot contain a form tag. They must be imported within the form tags in the .aspx page. This makes the code work as though it was always within the .aspx page.
Before importing the .ascx file into your .aspx page you need to register a tag that you will use to do the importing with:
Code:
<% @Register tagprefix="usercontrol" Tagname="footer" src="footer.ascx" %>
The above code will register the usercontrol tag for your use. This code would go at the top of your .aspx page along with any necessary namespace imports.
To include the .ascx code at a particular position in your .aspx page you now need to use the tag you just registered.
Code:
<usercontrol:footer id="footer1" runat="server"></usercontrol:footer>
By specifying an id for the control you allow yourself the ability to call any subprocedures or functions within the user control. (By first referencing the id e.g. footer1.mySub() ).
Hope that helps
--------------------
:) James Sellwood :)
--------------------