J
Joe Spooner
Hello,
This may seem very obvious to someone else, but I'm at a loss for an
answer to this problem.
I have written an HttpHandler that opens up an html file and returns a
string. This works great, but what if I have a file that is .aspx? I
realize that I'm always going to get just straight text/string as my
output, but I don't know what to look for or call in order to process
the .aspx correctly.
My goal is to have a url like http://www.website.com/mypage.html open
up the file mypage.html and also wrap a design around it. The current
method that I have in place works great for static navigation, but
will not work for something that needs to be compiled by the aspnet
dll.
Below is a very simplified diagram of what I'm trying to do:
-----------------------------------------------
web.config is:
----------------
<httpHandlers>
<add verb="*" path="*.aspx,*.htm"
type="CALS.CalsHandler,CalsHandler" />
</httpHandlers>
-----------------------------------------------
handler code is:
----------------
public void ProcessRequest(HttpContext context)
{
HttpResponse objResponse = context.Response;
HttpRequest objRequest = context.Request;
PageBuilder pgBuild = new PageBuilder();
objResponse.Write(pgBuild.Build(objRequest.PhysicalApplicationPath,
objRequest.PhysicalPath));
}
-----------------------------------------------
Note that PageBuilder is an object designed to create the output for
the browser (string not aspx).
Cheers!
Joe
This may seem very obvious to someone else, but I'm at a loss for an
answer to this problem.
I have written an HttpHandler that opens up an html file and returns a
string. This works great, but what if I have a file that is .aspx? I
realize that I'm always going to get just straight text/string as my
output, but I don't know what to look for or call in order to process
the .aspx correctly.
My goal is to have a url like http://www.website.com/mypage.html open
up the file mypage.html and also wrap a design around it. The current
method that I have in place works great for static navigation, but
will not work for something that needs to be compiled by the aspnet
dll.
Below is a very simplified diagram of what I'm trying to do:
-----------------------------------------------
web.config is:
----------------
<httpHandlers>
<add verb="*" path="*.aspx,*.htm"
type="CALS.CalsHandler,CalsHandler" />
</httpHandlers>
-----------------------------------------------
handler code is:
----------------
public void ProcessRequest(HttpContext context)
{
HttpResponse objResponse = context.Response;
HttpRequest objRequest = context.Request;
PageBuilder pgBuild = new PageBuilder();
objResponse.Write(pgBuild.Build(objRequest.PhysicalApplicationPath,
objRequest.PhysicalPath));
}
-----------------------------------------------
Note that PageBuilder is an object designed to create the output for
the browser (string not aspx).
Cheers!
Joe