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); }