I desperately want to use server components in a project that I'm working on, because I just have HTML code that repeats, and I need to get it on multiple pages. Required I use ascx or some other include technologies ... I mean, will there be a lightning strike if I use the server side?
My client - the average person - says: "Do what is easiest, it will probably be redone in the CMS soon." Can I use the server side?
This is ASP.NET 2.0.
Note: I feel that this was asked before, but I could not find it. If you have, let me know and I will personally delete it, thanks!
Edit: Any way to get ON ONE LINE turned on will be fine with me if you have any suggestions.
Edit: Why do I like to enable it?
Include code:
!--#include file="inc_footer.aspx"-->
the same code for the control. First you need one of these
<%@ Register TagPrefix="a" TagName="HeyFooter" Src="inc_footer.ascx" %>
and then you can use it as follows
<a:HeyFooter runat="server" />
it's a long time for what i need.
Note Two security concerns include: 1) do not use the .inc extension, as it can be viewed. 2) do not include file names based on user variables, as o ut's best answer points.
source share