Solved

Create Dynamic .net pages

Posted on 2008-06-16
2
217 Views
Last Modified: 2013-12-17
Hi all
I need to process all requests to pages with ext. (.htm) and create the page myself. I am not sure how to implement my page handler. I have been playing with code attached ... is this totaly of the mark ??
(have adjusted iis to process these pages)

Thanks
class PageHandler : IHttpHandler, IRequiresSessionState 

           	{

		public bool IsReusable

		{

			get { return false; }

		}
 

		public void ProcessRequest(HttpContext context)

		{

                  }

}

Open in new window

0
Comment
Question by:simshp
2 Comments
 
LVL 51

Expert Comment

by:tedbilly
ID: 21809928
Hmm, did you realize that you can register the extension in IIS and simply use ASP.NET?

If you select the [Configuration] button on a website or virtual directory that is an application you can use extension mappings to trigger process .HTM files with he ASP.NET DLL.

In ASP.NET 2.0 you can actually do it with the web.config.

You shouldn't have to write any customized code.  If the extension is register properly you simply create HTM files the same way you would create an ASPX page.
0
 

Accepted Solution

by:
simshp earned 0 total points
ID: 21810857
Thanks I have mapped the .htm in web.config (asp.net 2.0) and used :
class PageHandler : System.Web.UI.Page, IRequiresSessionState and overrriden the OnInit event where I load the controls I need. Thanks for responding though.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now