Solved

Create Dynamic .net pages

Posted on 2008-06-16
2
221 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

679 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