I want to create basic usercontrol code libraries. Is the
following possible? If so, how?
As a front-end developer being exposed to the concept of
usercontrols, I thought (asked the question), with .net
it must be possible to have template files that contain
similar front-end static or dynamic code from which code
be called, much in the same way a javascript functions
can be called from a js library.
FOR INSTANCE
I work on a site with multiple sections. Each section has
an asp header file with a tab on state fro navigation.
With .net, I want to replace my multiple header asp files
with a 'Headers' usercontrol library file from which i
can call any header.
E.G.
----------------HEADER_USERCONTROL.ASPX FILE--------------
-------------
<%@ COMMON CODEBEHIND FOR HEADERS %>
<% HEADER_X START TAGNAME="HEADX" %>
header_x html code, (could be static or dynamic)
<% HEADER_X END %>
<% HEADER_Y START TAGNAME="HEADY" %>
header_y html code, (could be static or dynamic)
<% HEADER_Y END %>
<% HEADER_Z START TAGNAME="HEADZ" %>
header_z html code, (could be static or dynamic)
<% HEADER_Z END %>
----------------HEADER_USERCONTROL.ASPX FILE--------------
-------------
----------------PARENT PAGE.ASPX FILE---------------------
------
<%@ SITE DEFAULT CODEBEHIND %>
<%@ Register TagPrefix="UserControl_LIB"
Src="HEADER_USERCONTROL.ASPX" %>
<html>
<body>
<UserControl_LIB:HEADZ runat="server" />
</body>
</html>
----------------PARENT PAGE.ASPX FILE---------------------
------
If you understood that lot, great. That's pretty much
what I hope is possible within .net.
Can anyone help??
Cheers, kevin