G
Guest
Hi folks,
I'm using ASP.net with Framework vs 1.1
I'm inheriting from a custom rolled master page class that is just that a
class that inherits from web.ui.page but it has no designer associated with
it. I want to generate some HTML inside the class and then that stuff will be
on every actual .aspx page that inherits from my master page class.
I want this to be output on every page (amongst other stuff)
<body id="intro">
<ul id="nav">
<li id="t-intro"><a href="Home.aspx">Home</a></li>
<li id="t-about"><a href="Reports.aspx">Reports</a></li>
<li id="t-news"><a href="Search.aspx.html">Search for a Record</a></li>
<li id="t-sponsors"><a href="admin.aspx">Admin</a></li>
</ul>
</body>
</html>
This is a navigation tab that I learned from Dan Cederholm's excellent book.
When it's CSSd it looks great
so my question is. What .net classes can be used to create these controls in
the masterPage class (litercontrol?, htmlControl?, htmlGenericControl)
I've had a go with no success and what's thwarting me is that whilst it's
easy to add say a <h1> heading this way, I have no idea how to add the outer
<ul> tag and then nest some <li> children inside it and then close the outer
tag...I can't seem to get any help from help
in a nutshell.
if I could get my master page class to generate some html inside it using
proper server activatable html controls, then every page I use will inherit
from my class masterPage and not web.ui.page and therefore it will have that
nav bar on it. (I've adapted this example from something I read in Esposito
magnum opus, so I'm not completely mad) the code has to be 'controls in
memory' (rather than just html strings) because I want to change certain
attributes of it on each page
any idea what code to write to generate that collection of HTML controls?
any answer would be greatly appreciated
Regards and thanks in advance,
CharlesA
I'm using ASP.net with Framework vs 1.1
I'm inheriting from a custom rolled master page class that is just that a
class that inherits from web.ui.page but it has no designer associated with
it. I want to generate some HTML inside the class and then that stuff will be
on every actual .aspx page that inherits from my master page class.
I want this to be output on every page (amongst other stuff)
<body id="intro">
<ul id="nav">
<li id="t-intro"><a href="Home.aspx">Home</a></li>
<li id="t-about"><a href="Reports.aspx">Reports</a></li>
<li id="t-news"><a href="Search.aspx.html">Search for a Record</a></li>
<li id="t-sponsors"><a href="admin.aspx">Admin</a></li>
</ul>
</body>
</html>
This is a navigation tab that I learned from Dan Cederholm's excellent book.
When it's CSSd it looks great
so my question is. What .net classes can be used to create these controls in
the masterPage class (litercontrol?, htmlControl?, htmlGenericControl)
I've had a go with no success and what's thwarting me is that whilst it's
easy to add say a <h1> heading this way, I have no idea how to add the outer
<ul> tag and then nest some <li> children inside it and then close the outer
tag...I can't seem to get any help from help
in a nutshell.
if I could get my master page class to generate some html inside it using
proper server activatable html controls, then every page I use will inherit
from my class masterPage and not web.ui.page and therefore it will have that
nav bar on it. (I've adapted this example from something I read in Esposito
magnum opus, so I'm not completely mad) the code has to be 'controls in
memory' (rather than just html strings) because I want to change certain
attributes of it on each page
any idea what code to write to generate that collection of HTML controls?
any answer would be greatly appreciated
Regards and thanks in advance,
CharlesA