Mark Scott
1/4/2003 12:15:00 AM
I have for example a Web UserControl called Header, it has various
properties, but I currently have to call a function to add links to the
header. I have to in code say something like header.AddLink("Home",
"/index.html");
What I would like is to rather than have that function, be able to specify
this in the html part of the aspx page, something like:
<mycode:header runat="server" Property1="0" Property2="True">
<HeaderLink Text="Home Page" URL="/index.html" />
<HeaderLink Text="Software Section" URL="/software/index.html" />
</mycode:header>
In the code, I add special links into the header, and would like the html
example to be able to accomplish the same thing. However, I'm not sure
where I would even start on accomplishing having this HeaderLink subitem
setup. I have many other times desired this functionality in my web
controls, but went about it differently.
The code doesn't have to look exactly like what I typed above, but something
along those lines, such that I don't have to put some inline code to call my
'AddLink' function, either in the .aspx or in the .cs file. Doing something
similar to the method I desire would improve readability greatly.
Thanks in advance!
Mark E. Scott Jr.
mscott@awfs.net