A
Abhishek Srivastava
Hello All,
In almost all websites which I have developed, we need to follow a
layout template (header, footer, menu on left hand side etc)
In ASP.NET solutions, we can do this in two ways
1) use user controls.
But frankly, making a "control" which renders a table of width 100% with
a gif somehow to me it seems wrong. I would create a control to
encapsulate a particular piece of functionality or component. Not really
to control the page layout.
Secondly if I am changing the layout tomorrow (maybe I found a better
javascript tree library) then I have to rebuild recompile the user control.
2) Use a common base class for Code behind classes.
This is also good. but then the layout gets tied up with C# code. and
therefore, layout change would mean getting a C# programmer first.
Is there some better way of implementing templates or site look and
feel. Why not specify the layout of a page in an XML format. and then
the asp.engine doing its rendering only into a specific portion as
specified in the XML. So that If I find a better tree control I just
change the xml file so that the new javascript tree menu gets included.
regards,
Abhishek.
In almost all websites which I have developed, we need to follow a
layout template (header, footer, menu on left hand side etc)
In ASP.NET solutions, we can do this in two ways
1) use user controls.
But frankly, making a "control" which renders a table of width 100% with
a gif somehow to me it seems wrong. I would create a control to
encapsulate a particular piece of functionality or component. Not really
to control the page layout.
Secondly if I am changing the layout tomorrow (maybe I found a better
javascript tree library) then I have to rebuild recompile the user control.
2) Use a common base class for Code behind classes.
This is also good. but then the layout gets tied up with C# code. and
therefore, layout change would mean getting a C# programmer first.
Is there some better way of implementing templates or site look and
feel. Why not specify the layout of a page in an XML format. and then
the asp.engine doing its rendering only into a specific portion as
specified in the XML. So that If I find a better tree control I just
change the xml file so that the new javascript tree menu gets included.
regards,
Abhishek.