Solved

Create Dynamic .net pages

Posted on 2008-06-16
2
219 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:Ted Bouskill
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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