private void add_content (DataRow content_row) { Control c = this.LoadControl("question_contentblock.ascx"); liveclassic.question_contentblock cc_control = (liveclassic.question_contentblock)c; cc_control.ID = "ccc_" + content_row["element_id"].ToString(); cc_control.read_direction = bodyDirection; #region load element_information utility.pageelement_information element_information = new utility.pageelement_information(); element_information.element_id = Int32.Parse(content_row["element_id"].ToString()); element_information.element_text = content_row["element_text"].ToString(); element_information.element_type_FK = content_row["element_type_FK"].ToString(); element_information.sort_sequence = Int32.Parse(content_row["sort_sequence"].ToString()); #endregion cc_control.content_row = element_information; cc_control.session_valid = false; cc_control.post_params = null; panel_questions.Controls.Add(cc_control); }
private void add_content (DataRow content_row) { // HtmlTable content_table = new HtmlTable(); // content_table.CellPadding = 0; // content_table.CellSpacing = 0; // content_table.Width = "560"; // HtmlTableRow first_row = new HtmlTableRow(); // HtmlTableCell first_row_cell = new HtmlTableCell(); // first_row_cell.Align = bodyDirection; Control c = this.LoadControl("question_contentblock.ascx"); liveclassic.question_contentblock cc_control = (liveclassic.question_contentblock)c; cc_control.ID = "ccc_" + content_row["element_id"].ToString(); cc_control.read_direction = bodyDirection; #region load element_information utility.pageelement_information element_information = new utility.pageelement_information(); element_information.element_id = Int32.Parse(content_row["element_id"].ToString()); element_information.element_text = content_row["element_text"].ToString(); element_information.element_type_FK = content_row["element_type_FK"].ToString(); element_information.sort_sequence = Int32.Parse(content_row["sort_sequence"].ToString()); #endregion cc_control.content_row = element_information; cc_control.session_valid = session_valid; cc_control.post_params = post_params; // string content_db = content_row["element_text"].ToString(); // content_db = utility.use_sslsource(content_db); // if (session_valid) // { // content_db = utility.Replacekeys(content_db, post_params); // } // first_row_cell.InnerHtml = content_db; // first_row.Cells.Add(first_row_cell); // // content_table.Rows.Add(first_row); panel_questions.Controls.Add(cc_control); }
private void add_header (DataRow header_row) { Control c = this.LoadControl("question_header.ascx"); liveclassic.question_header bh_control = (liveclassic.question_header)c; bh_control.ID = "bhc_" + header_row["element_id"].ToString(); bh_control.read_direction = bodyDirection; #region load element_information utility.pageelement_information element_information = new utility.pageelement_information(); element_information.element_id = Int32.Parse(header_row["element_id"].ToString()); element_information.element_text = header_row["element_text"].ToString(); element_information.element_type_FK = header_row["element_type_FK"].ToString(); element_information.sort_sequence = Int32.Parse(header_row["sort_sequence"].ToString()); #endregion bh_control.header_row = element_information; bh_control.session_valid = false; bh_control.post_params = null; panel_questions.Controls.Add(bh_control); }
private void add_header (DataRow header_row) { Control c = this.LoadControl("question_header.ascx"); liveclassic.question_header bh_control = (liveclassic.question_header)c; bh_control.ID = "bhc_" + header_row["element_id"].ToString(); bh_control.read_direction = bodyDirection; #region load element_information utility.pageelement_information element_information = new utility.pageelement_information(); element_information.element_id = Int32.Parse(header_row["element_id"].ToString()); element_information.element_text = header_row["element_text"].ToString(); element_information.element_type_FK = header_row["element_type_FK"].ToString(); element_information.sort_sequence = Int32.Parse(header_row["sort_sequence"].ToString()); #endregion bh_control.header_row = element_information; bh_control.session_valid = session_valid; bh_control.post_params = post_params; panel_questions.Controls.Add(bh_control); // string header_text = header_row["element_text"].ToString(); // if (session_valid) // { // header_text = utility.Replacekeys(header_text, post_params); // } // // Literal header = new Literal(); // header.Text = @"<table cellSpacing=""0"" cellPadding=""0"" width=""560"" border=""0""><tr class=""theme"">"; // header.Text += @"<td align=""left"" width=""10""><img height=""1"" alt="""" src=""https://secure.hp-ww.com/img/s.gif"" width=""10""></td><td vAlign=""top"""; // header.Text += @"align=""" + bodyDirection + @""" width=""550"">"; // header.Text += @"<h2 class=""themeheader"">"; // header.Text += header_text; // header.Text += @"</h2></td></tr><tr class=""decoration""><td colSpan=""2""><img height=""10"" alt="""" src=""https://secure.hp-ww.com/img/s.gif"" width=""1""></td></tr></table>"; // panel_questions.Controls.AddAt(Int32.Parse(header_row["sort_sequence"].ToString())-1, header); }