public void ProcessRequest(HttpContext context) { var theoryPageId = int.Parse(context.Request[PageIdRequestParameter]); var page = ServerModel.DB.Load <TblPages>(theoryPageId); CheckPageType(page); var html = Encoding.Unicode.GetString(page.PageFile.ToArray()); context.Response.Write(TestControlHelper.ChangeImageUrl(html, page)); }
private void ShowPage(TblPages page) { Control control; if ((FX_PAGETYPE)page.PageTypeRef == FX_PAGETYPE.Practice) { control = TestControlHelper.GetPracticeControl(page, PageContent); RedirectSubmitEventsToThisController(control, page.ID); } else { control = TestControlHelper.GetTheoryControl(page, PageContent); } PageContent.Controls.Clear(); PageContent.Controls.Add(control); }
private void AddControl(TblPages page) { Control control; if ((FX_PAGETYPE)page.PageTypeRef == FX_PAGETYPE.Practice) { control = TestControlHelper.GetPracticeControl(page, PageContent); } else { throw new Exception("You can't see details for theory page"); } PageContent.Controls.Clear(); PageContent.Controls.Add(control); FillAnswer(control); }