I should have added that's an ASP.NET 2.0-specific solution.
It's a bit simpler in ASP.NET 1.1.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
ASPNETFAQ.COM :
http://www.aspnetfaq.com/
Foros de ASP.NET en Español :
http://asp.net.do/foros/
======================================
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uu**************@TK2MSFTNGP09.phx.gbl...
If all Bryan wants to do is add a specific extension ( .abcd ) to the
pages which are served by his server, he can use this in web.config:
<httpHandlers>
<add verb="GET, HEAD, POST, DEBUG" path="*.abcd" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
<compilation>
<buildProviders>
<add extension=".abcd" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
and map the extension .abcd to aspnet_isapi.dll in the
Application's configuration section in the Internet Service Manager.
That will cause ASP.NET to process the .abcd extension
in the exact same way it processes files with the .aspx extension.
That means that, if the page is named "whatever.abcd", the corresponding
codebehind pages would need to be named : "whatever.abcd.cs" or "whatever.abcd.vb".
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
ASPNETFAQ.COM :
http://www.aspnetfaq.com/
Foros de ASP.NET en Español :
http://asp.net.do/foros/
======================================
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:O2**************@TK2MSFTNGP15.phx.gbl...
Once you have a handler, the handler is responsible entirely for the
processing. How you handle the different page names is entirely up to you.
From what you're asking, it seems that you don't want a custom HttpHandler;
you just want pages with a .abcd extension to be handled by ASP.Net page
classes. For that, all you need to do is configure IIS to hand off requests
for pages with that extension to the ASP.Net ISAPI.
--
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition
<br***@newsgroups.nospam> wrote in message
news:c3********************************@4ax.com... If I understand correctly, I can write a custom handler for a given
extension (say .abcd files) by writing a class that implements the
IHttpHandler interface and then registering it in my web config file.
Once I do that, how do I differentiate between different pages with
the abcd extension, and write specific code for each page? (And keep
that code with the page, similar to codebehind.?)
Thanks,
Bryan