Skip to content

Instantly share code, notes, and snippets.

@cchitsiang
Created April 17, 2016 09:46
Show Gist options
  • Save cchitsiang/c9ec6bcaf86e135abd0c3404597eb5b1 to your computer and use it in GitHub Desktop.
Save cchitsiang/c9ec6bcaf86e135abd0c3404597eb5b1 to your computer and use it in GitHub Desktop.
HttpHandler sample code
<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
public class Handler : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "html";
context.Response.Write("Hello World");
manaeform(context);
}
public void manaeform(HttpContext context)
{
context.Response.Write("<html><body><form>");
context.Response.Write("<h2>Select your feature</h2>");
if (context .Request .Params ["Feature"]==null)
{
context.Response.Write("<select name='Feature'>");
context.Response.Write("<option>asp.net </option>");
context.Response.Write("<option>java </option>");
context.Response.Write("</select></form></body></html>");
}
}
public bool IsReusable {
get {
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment