Hello!
> To redisrect to other pages you can use one of this:
> Server.Execute, Server.Transfer, Response.Redirect or Page.Navigate.
I've used the Server.Execute() method to effectively enable 'dynamic
includes' in my Content Management System. Rough description:
Basically, I have a master template (index.aspx) which - through the
business logic - knows which 'plugins' have been assigned to the page.
Then I (roughly) just iterate through the object and use the
Server.Execute() to execute each plugin. For instance a file located at
/root/plugz/gallery/index.aspx.
The index.aspx file contains the business-logic for that very plugin,
and that plugin only. It contains a Page_Load function which is execute
once the Server.Execute() requests the page. Additionally, the
index.aspx file *includes* one or more .aspx files (for instance,
located in /root/plugz/gallery/includes). Notice that this is done using
the *include* directive and *not* by using pagelets, custom controls or
user controls. Basically, you could say it's a more flexible kind of
custom controls because you don't have to re-compile each and every
control before testing.
You could say the index.aspx file is like the public static Main() found
in executeables and the actual functions/classes reside in the
/includes/ directory.
By keeping this approach, a lot of programmers can benefit from the
datalayer/data framework I've written and still work together on the
entire site, but by building their own small cornerstones individually.
They don't have to sit there and compile + copy components to the /bin
directory all the time. The risk of other programmers 'messing around'
with the datalayer components in the /bin directory is also too high!
I guess it's the best way to merge the ASP approach (which works pretty
good for web development if you ask me) and the powerfull classes of
.NET.
Trust me, for web development, it's a truly killer. That said, I've
never fancied the page-controls that comes with ASP.NET like the
DataGrid component. I like to have 100% control of all HTML - call me
oldskool. I like it.
With Regards
Anders Lundholm - lundholm@s...
--