Search:
Namespaces
Discussions
.NET v1.1
Feedback
Separating content rendering in BeginRequest/EndRequest
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspnghttphandlers' list
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Dan Green (VIP)
Application_BeginRequest and EndRequest offer an easy way to create
headers and footers across a suite of pages (gotta love the asp.net
runtime).
The issue I have is that the output to be rendered is currently
contained in code, with a bunch of
Context
.Response.Write methods.
Instead of code, I'd like to have the content to be rendered stored in a
an .aspx-like file.
Is this an easy thing to do? Are there ways of implementing
IHttpModule
with a content and code behind file?
I haven't given this a lot of thought, but I thought before I went and
implemented a mechanism that just went and read a text file (acting as
the content file) from the file system I'd ask.
Dan Green
[
http://dotnetdan.com
-- putting the dan in .net ]
Reply to this message...
dave wanta (VIP)
Hi Dan,
Don't know if anyone's replied to this message, but it's also something I'm
very interested in.
The only problem I've had with your scenario, is that ALL pages will have
that same header and footer. This may not be acceptable in some
circumstances. Take for instance News or Tutorial sites. They may have a
print button that allows the user to print the content with no header,
footer, banner ads, etc...
Instead, Jonathan Goodyear wrote an interesting article, that I'm thinking
of implementing (and wish I had on 123aspx.com). He created a new page
object that contains those headers and footers and inherits from that page
object. Let's go one step farther, let's store the header and footer in the
web cache and set the content to expire on the file dependency.
Any thoughts?
Here is the link to JG's article...
http://www.fawcette.com/vsm/2001
_12/magazine/columns/aspnet/
Cheers!
dave wanta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.123aspx.com
The Largest ASP.NET Web Directory!
Find the latest ASP.NET resources --
Subscribe to our newsletter!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Dan Green" <
Click here to reveal e-mail address
>
To: "aspnghttphandlers" <
Click here to reveal e-mail address
>
Sent: Friday, November 16, 2001 5:42 AM
Subject: [aspnghttphandlers] Separating content rendering in
BeginRequest/EndRequest
[Original message clipped]
Reply to this message...
Dan Green (VIP)
Hi Dave,
Thanks for the reply. I'm going to take a look at the article.
I really like the web cache idea, btw.
> The only problem I've had with your scenario, is that ALL pages will
have
> that same header and footer.
Does it have to be so? If we were using an HttpModule rather than the
Application_[Begin|End]Request methods, we could at least only enable
the module on certain subdirs (by using the web.config file).
Dan Green
[
http://dotnetdan.com
-- putting the dan in .net ]
[Original message clipped]
Reply to this message...
System.Runtime.Remoting.Contexts.Context
System.Web.IHttpModule
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com