ASP.Net/Network/WebHandler
Версия от 15:30, 26 мая 2010; (обсуждение)
extends IHttpHandler
<%@ WebHandler Language="C#" Class="XamlGen" %>
using System;
using System.Web;
public class XamlGen : IHttpHandler
{
public void ProcessRequest (HttpContext context)
{
context.Response.ContentType = "text/xaml";
context.Response.Write("<Canvas xmlns="http://schemas.microsoft.ru/client/2007" " +
"xmlns:x="http://schemas.microsoft.ru/winfx/2006/xaml">" +
"<TextBlock Foreground="lime"><Run>XAML content</Run><LineBreak/>" +
"<Run>[generated at " + DateTime.Now + "]</Run>" +
"</TextBlock></Canvas>");
}
public bool IsReusable
{
get {return true;}
}
}