Hi,
I'm trying to create a handler in a non mvc solution (~/Photo/ThumbnailHandler.ashx), but I keep getting this error: Type 'ThumbnailHandler' does not inherit from 'System.Web.UI.Page'. I've been trying to google around and finding my errors, but I honest cannot figure what I'm doing wrong. Would someone please help me by showing an example and explaining my mistake to me?
// Global.asax
<%@ Application Language="C#" %>
<%@ Import Namespace="System.Web.Routing" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
RegisterRoutes(RouteTable.Routes);
}
void RegisterRoutes(RouteCollection routes)
{
// SERVER/Photographies/{folder}
routes.MapPageRoute("PhotographiesRoute", "Photographies/{folder}", "~/Photo/Default2.aspx");
// SERVER/Photographies/{folder}/{file}
...
Go to the complete details ...