S
suzy
this is driving me crazy. i hear so many people telling me page templates
are easy, so why can't i get it to work in a nice way.
i just looked at the following site to find out how to implement page
temlates
(http://authors.aspalliance.com/mamanze/articles/?path=pagetemplate3).
i thought it was working fine, but then i realised it was rendering the
<HTML>, <HEAD>, <TITLE> and <BODY> twice (ie: it puts the source of my
template within the body tag of my aspx source). this is obviously not
good, and causes several problems, one of which is the fact that i can't set
a title to my aspx pages.
i have also seen examples which override the render method (like this:
http://www.devarticles.com/c/a/ASP.NET/Easy-ASP.NET-Page-Templates/1/). but
from my understanding this means that when i override the render method, i
have to write out the html, title and body tags in my c# code and wrap these
around the base.Render command.
this also seems messy because it doesn't seem right to put html code in a c#
class, especially when you are creating several nested tables. but it works
i guess.... except when i try and create html code in my aspx page. my html
source cannot have html, title or body tags because the template takes care
of this. this means i have to start with a table or form tag, etc. vs.net
complains about this saying it needs a parent element. i know this is just a
warning message and doesn't stop it compiling, but there must be a neat way
of doing page templates without such warnings.
i hope this makes sense, can anyone help? please please please!!!
are easy, so why can't i get it to work in a nice way.
i just looked at the following site to find out how to implement page
temlates
(http://authors.aspalliance.com/mamanze/articles/?path=pagetemplate3).
i thought it was working fine, but then i realised it was rendering the
<HTML>, <HEAD>, <TITLE> and <BODY> twice (ie: it puts the source of my
template within the body tag of my aspx source). this is obviously not
good, and causes several problems, one of which is the fact that i can't set
a title to my aspx pages.
i have also seen examples which override the render method (like this:
http://www.devarticles.com/c/a/ASP.NET/Easy-ASP.NET-Page-Templates/1/). but
from my understanding this means that when i override the render method, i
have to write out the html, title and body tags in my c# code and wrap these
around the base.Render command.
this also seems messy because it doesn't seem right to put html code in a c#
class, especially when you are creating several nested tables. but it works
i guess.... except when i try and create html code in my aspx page. my html
source cannot have html, title or body tags because the template takes care
of this. this means i have to start with a table or form tag, etc. vs.net
complains about this saying it needs a parent element. i know this is just a
warning message and doesn't stop it compiling, but there must be a neat way
of doing page templates without such warnings.
i hope this makes sense, can anyone help? please please please!!!
