public void ProcessRequest(HttpContext context) { try { context.Response.ContentType = "text/html"; string action = context.Request["action"]; if (action == "view") { uint ID = Convert.ToUInt32(context.Request["pid"]); Problem problem = ProblemService.SelectByProblemID(ID); var Data = new { problem = problem }; string html = CommonHelper.RenderHtml("problemView.html", Data); context.Response.Write(html); } else { context.Response.Redirect("index.ashx", false); } } catch (Exception e) { LogService.Insert(0, e); context.Response.Redirect("index.ashx", false); } }