Solved

Create Dynamic .net pages

Posted on 2008-06-16
2
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to redirect sub-domains on IIS 4 56
asp.net figure out error 3 47
Learning About The VB.NET TableLayoutPanel Control 5 42
AD Computer Objects in VB .Net 2 21
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

759 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