using System;
using System.Web;
using System.Text;
public class _06Caculate : IHttpHandler {
public void ProcessRequest (HttpContext context) {
string Num1 = context.Request.Form["txtNum1"];
string Num2 = context.Request.Form["txtNum2"];
int x = 0;
int y = 0;
int z = 0;
if (!string.IsNullOrEmpty("hiddenIsPostBack"))
{
if (!string.IsNullOrEmpty(Num1) && !string.IsNullOrEmpty(Num2))
{
if (int.TryParse(Num1, out x) && int.TryParse(Num2, out y))
{
z = x + y;
}
}
}
else
{
}
StringBuilder sb = new StringBuilder();
sb.Append("<form action='' method='post'>");
sb.Append("<html><head><title>计算器</title></head><body>");