private void AddPageToTable(DataObjects.Page page) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerHtml = "<a href='/page/" + page.PageID.ToString() + "'>" + page.ShortTitle + "</a>"; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.Volume; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.Issue; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.Year; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.IndicatedPages; row.Cells.Add(cell); tblPages.Rows.Add(row); }
private void LLenarCampos() { string vl_sMensajeError = string.Empty; var vl_cNegocio = new Negocio.ADM.NTrama(); var vl_dtDetalleTrama = vl_cNegocio.DetalleTrama("1234567890", this.lbEncID.Text, ref vl_sMensajeError); if (vl_sMensajeError == string.Empty) { foreach (DataRow vl_drRow in vl_dtDetalleTrama.Rows) { System.Web.UI.HtmlControls.HtmlTableRow vl_trCampo = (System.Web.UI.HtmlControls.HtmlTableRow)pnSimular.FindControl("trCampo" + vl_drRow["det_campo"].ToString()); vl_trCampo.Visible = true; Label vl_lbNombreCampo = (Label)pnSimular.FindControl("lbNombreCampo" + vl_drRow["det_campo"].ToString()); vl_lbNombreCampo.Text = vl_drRow["det_nombre"].ToString(); TextBox vl_tbCampo = (TextBox)pnSimular.FindControl("tbCampo" + vl_drRow["det_campo"].ToString()); Label vl_lbDescripcion = (Label)pnSimular.FindControl("lbDescripcion" + vl_drRow["det_campo"].ToString()); vl_lbDescripcion.Text = vl_drRow["det_descripcion"].ToString(); if (vl_drRow["det_estatico"].ToString().ToUpper() == "S") { vl_tbCampo.Text = vl_drRow["det_estatico_informacion"].ToString(); vl_tbCampo.Enabled = false; } else { vl_tbCampo.Text = ""; vl_tbCampo.Enabled = true; } } } else { MyMaster.AlertaMostrar(vl_sMensajeError); } }
// The next two functions simply create the html for the status tables. You can safely ignore these. protected void CreateStatusTable(DocuSignAPI.FilteredEnvelopeStatuses statuses) { foreach (DocuSignAPI.EnvelopeStatus status in statuses.EnvelopeStatuses) { var containerDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); var info = new System.Web.UI.HtmlControls.HtmlGenericControl("p") { InnerHtml = "<a href=\"javascript:toggle('" + status.EnvelopeID + "_Detail" + "');\"><img src=\"images/plus.png\"></a> " + status.Subject + " (" + status.Status.ToString() + ") - " + status.EnvelopeID }; containerDiv.Controls.Add(info); System.Web.UI.HtmlControls.HtmlGenericControl envelopeDetail = CreateEnvelopeTable(status); envelopeDetail.Attributes[Keys.Class] = "detail"; envelopeDetail.Attributes[Keys.Id] = status.EnvelopeID + "_Detail"; containerDiv.Controls.Add(envelopeDetail); var tr = new System.Web.UI.HtmlControls.HtmlTableRow(); var tc = new System.Web.UI.HtmlControls.HtmlTableCell(); tc.Controls.Add(containerDiv); tr.Cells.Add(tc); statusTable.Rows.Add(tr); } }
public void ClearPageErrorNotification(System.Web.UI.HtmlControls.HtmlTableRow tr_Notify, System.Web.UI.HtmlControls.HtmlGenericControl sp_Notify) { tr_Notify.Style["display"] = "none"; sp_Notify.InnerHtml = string.Empty; sp_Notify.Style["display"] = "none"; }
protected void phValue_Load(object sender, EventArgs e) { PlaceHolder phValue = (PlaceHolder)sender; if (phValue.Controls.Count > 0) { return; } System.Web.UI.HtmlControls.HtmlTableRow tr = (System.Web.UI.HtmlControls.HtmlTableRow)phValue.Parent.Parent.Parent; ColumnSelect csWhere = (ColumnSelect)tr.FindControl("csWhere"); foreach (string SelectControl in csWhere.SelectControlList) { UserControl c = (UserControl)LoadControl(SelectControl); if (!(c is MetricTrac.Utils.IValueSelectControl)) { continue; } System.Reflection.PropertyInfo pi = c.GetType().GetProperty("Width"); if (pi != null) { pi.SetValue(c, new Unit(300, UnitType.Pixel), null); } Panel p = new Panel(); p.ID = System.IO.Path.GetFileNameWithoutExtension(SelectControl); p.Style.Add("display", "none"); phValue.Controls.Add(p); p.Controls.Add(c); } }
// Add the recipients to the UI protected void AddRecipients(DocuSignAPI.Recipient[] recipients) { int i = 1; foreach (DocuSignAPI.Recipient recipient in recipients) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell roleCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell nameCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell emailCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell securityCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell inviteCell = new System.Web.UI.HtmlControls.HtmlTableCell(); roleCell.InnerHtml = "<input id=\"RecipientRole\" type=\"text\" readonly=\"true\" name=\"RecipientRole" + i.ToString() + "\" value=\"" + recipient.RoleName + "\"/>"; nameCell.InnerHtml = "<input id=\"RecipientName\" type=\"text\" name=\"RecipientName" + i.ToString() + "\" value=\"" + recipient.UserName + "\"/>"; emailCell.InnerHtml = "<input id=\"RecipientEmail\" type=\"text\" name=\"RecipientEmail" + i.ToString() + "\" value=\"" + recipient.Email + "\"/>"; string security = ""; if (!String.IsNullOrEmpty(recipient.AccessCode)) { security = "Access code: " + recipient.AccessCode; } else if (recipient.PhoneAuthentication != null) { security = "Phone Authentication"; } else if (recipient.RequireIDLookup) { security = "ID Check"; } else { security = "None"; } securityCell.InnerHtml = "<input id=\"RecipientSecurity\" type=\"text\" readonly=\"true\" name=\"RecipientSecurity" + i.ToString() + "\" value=\"" + security + "\"/>"; inviteCell.InnerHtml = "<ul class=\"switcher\" name=\"RecipientInvite" + i.ToString() + "\" ><li class=\"active\"><a href=\"#\" title=\"On\">ON</a></li><li><a href=\"#\" title=\"OFF\">OFF</a></li><input id=\"RecipientInviteToggle" + i.ToString() + "\" name=\"RecipientInviteToggle" + i.ToString() + "\" value=\"RecipientInviteToggle" + i.ToString() + "\" type=\"checkbox\" checked=\"\" style=\"display: none\"></ul>"; //<ul class="switcher" id="RecipientInvite1"> // <li id="RecipientInviteon1" class="active"><a href="#" title="On">ON</a></li> // <li id="RecipientInviteoff1"><a href="#" title="OFF">OFF</a></li> // <input id="RecipientInviteToggle1" name="RecipientInviteToggle1" value="RecipientInviteToggle1" type="checkbox" checked="" style="display: none"> //</ul> inviteCell.Attributes["ID"] = String.Format("RecipientInvite{0}", recipient.ID); inviteCell.Attributes["name"] = String.Format("RecipientInvite{0}", recipient.ID); row.Cells.Add(roleCell); row.Cells.Add(nameCell); row.Cells.Add(emailCell); row.Cells.Add(securityCell); row.Cells.Add(inviteCell); RecipientTable.Rows.Add(row); i++; } }
protected void Page_Load(object sender, EventArgs e) { System.Web.UI.HtmlControls.HtmlTableRow r1; System.Web.UI.HtmlControls.HtmlTableCell c1; System.Web.UI.HtmlControls.HtmlTableCell c2; System.Web.UI.HtmlControls.HtmlTableCell c3; System.Web.UI.HtmlControls.HtmlTableCell c4; System.Web.UI.HtmlControls.HtmlImage img; System.Web.UI.HtmlControls.HtmlGenericControl name; System.Web.UI.HtmlControls.HtmlInputText quant; System.Web.UI.HtmlControls.HtmlGenericControl subtot; System.Web.UI.WebControls.LinkButton rmvBtn; System.Web.UI.HtmlControls.HtmlGenericControl glyph; for (int i = 0; i < 5; i++) { r1 = new System.Web.UI.HtmlControls.HtmlTableRow(); c1 = new System.Web.UI.HtmlControls.HtmlTableCell(); c2 = new System.Web.UI.HtmlControls.HtmlTableCell(); c3 = new System.Web.UI.HtmlControls.HtmlTableCell(); c4 = new System.Web.UI.HtmlControls.HtmlTableCell(); img = new System.Web.UI.HtmlControls.HtmlImage(); name = new System.Web.UI.HtmlControls.HtmlGenericControl(); quant = new System.Web.UI.HtmlControls.HtmlInputText(); subtot = new System.Web.UI.HtmlControls.HtmlGenericControl(); rmvBtn = new System.Web.UI.WebControls.LinkButton(); glyph = new System.Web.UI.HtmlControls.HtmlGenericControl(); r1.Controls.Add(c1); r1.Controls.Add(c2); r1.Controls.Add(c3); r1.Controls.Add(c4); img.Src = "http://placehold.it/50"; name.InnerText = " Item name"; c1.Controls.Add(img); c1.Controls.Add(name); quant.Style["width"] = "5em"; c2.Controls.Add(quant); subtot.InnerText = "$10.00"; c3.Controls.Add(subtot); rmvBtn.CssClass = "btn btn-danger"; rmvBtn.PostBackUrl = "?delete=id"; glyph.Attributes.Add("aria-hidden", "true"); glyph.Attributes.Add("class", "glyphicon glyphicon-remove"); rmvBtn.Controls.Add(glyph); c4.Controls.Add(rmvBtn); cartDisplay.Controls.Add(r1); } }
protected void CreateControls() { DataTable dt = new DataTable(); KingTop.BLL.SysManage.PublicOper bllPublicOper = new KingTop.BLL.SysManage.PublicOper(); dt = bllPublicOper.GetList("ALL", Utils.getOneParams("")); DataRow[] dr1 = dt.Select("IsValid=1"); System.Web.UI.HtmlControls.HtmlTable t = new System.Web.UI.HtmlControls.HtmlTable(); int k = 0; int drLen = dr1.Length; if (drLen > 0) { for (int i = 0; i < drLen; i = i + 6) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); for (int j = 0; j < 6; j++) { k = i + j; if (k == drLen) { break; } DataRow dr = dr1[k]; if (dr["IsValid"].ToString() == "False") { continue; } System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlInputCheckBox chkbox1 = new System.Web.UI.HtmlControls.HtmlInputCheckBox(); chkbox1.Name = "OperName"; chkbox1.Value = dr["OperName"].ToString(); string s = string.Empty; if (myOperCode.IndexOf("," + dr["OperName"].ToString() + ",") != -1) { s = "<input id=\"" + dr["OperName"].ToString() + "\" type=\"checkbox\" name=\"OperName\" value=\"" + dr["OperName"].ToString() + "|" + dr["Title"].ToString() + "\" checked/><label for=\"" + dr["OperName"].ToString() + "\">" + dr["Title"].ToString() + "</label>"; } else { s = "<input id=\"" + dr["OperName"].ToString() + "\" type=\"checkbox\" name=\"OperName\" value=\"" + dr["OperName"].ToString() + "|" + dr["Title"].ToString() + "\" /><label for=\"" + dr["OperName"].ToString() + "\">" + dr["Title"].ToString() + "</label>"; } CheckBox chkbox = new CheckBox(); chkbox.ID = dr["OperName"].ToString(); chkbox.Text = dr["Title"].ToString(); cell.Width = "120px"; cell.InnerHtml = s; row.Cells.Add(cell); } t.Controls.Add(row); } } this.OperTD.Controls.Add(t); }
// Add the recipients to the UI protected void AddRecipients(DocuSignAPI.Recipient[] recipients) { int i = 1; foreach (DocuSignAPI.Recipient recipient in recipients) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell roleCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell nameCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell emailCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell securityCell = new System.Web.UI.HtmlControls.HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell inviteCell = new System.Web.UI.HtmlControls.HtmlTableCell(); roleCell.InnerHtml = "<input id=\"RecipientRole\" type=\"text\" readonly=\"true\" name=\"RecipientRole" + i.ToString() + "\" value=\"" + recipient.RoleName + "\"/>"; nameCell.InnerHtml = "<input id=\"RecipientName\" type=\"text\" name=\"RecipientName" + i.ToString() + "\" value=\"" + recipient.UserName + "\"/>"; emailCell.InnerHtml = "<input id=\"RecipientEmail\" type=\"text\" name=\"RecipientEmail" + i.ToString() + "\" value=\"" + recipient.Email + "\"/>"; string security = ""; if (!String.IsNullOrEmpty(recipient.AccessCode)) { security = "Access code: " + recipient.AccessCode; } else if (recipient.PhoneAuthentication != null) { security = "Phone Authentication"; } else if (recipient.RequireIDLookup) { security = "ID Check"; } else { security = "None"; } securityCell.InnerHtml = "<input id=\"RecipientSecurity\" type=\"text\" readonly=\"true\" name=\"RecipientSecurity" + i.ToString() + "\" value=\"" + security + "\"/>"; inviteCell.InnerHtml = "<ul class=\"switcher\" name=\"RecipientInvite" + i.ToString() + "\" ><li class=\"active\"><a href=\"#\" title=\"On\">ON</a></li><li><a href=\"#\" title=\"OFF\">OFF</a></li><input id=\"RecipientInviteToggle" + i.ToString() + "\" name=\"RecipientInviteToggle" + i.ToString() + "\" value=\"RecipientInviteToggle" + i.ToString() + "\" type=\"checkbox\" checked=\"\" style=\"display: none\"></ul>"; //<ul class="switcher" id="RecipientInvite1"> // <li id="RecipientInviteon1" class="active"><a href="#" title="On">ON</a></li> // <li id="RecipientInviteoff1"><a href="#" title="OFF">OFF</a></li> // <input id="RecipientInviteToggle1" name="RecipientInviteToggle1" value="RecipientInviteToggle1" type="checkbox" checked="" style="display: none"> //</ul> inviteCell.Attributes["ID"] = String.Format("RecipientInvite{0}", recipient.ID); inviteCell.Attributes["name"] = String.Format("RecipientInvite{0}", recipient.ID); row.Cells.Add(roleCell); row.Cells.Add(nameCell); row.Cells.Add(emailCell); row.Cells.Add(securityCell); row.Cells.Add(inviteCell); RecipientTable.Rows.Add(row); i++; } }
void GenerateTableHeader(String[] headers, ref System.Web.UI.HtmlControls.HtmlTable table) { var headerRow = new System.Web.UI.HtmlControls.HtmlTableRow(); foreach (var str in headers) { var header = new System.Web.UI.HtmlControls.HtmlTableCell("th"); header.InnerText = str; headerRow.Cells.Add(header); } table.Rows.Add(headerRow); }
private void CreateSubControls(System.Web.UI.HtmlControls.HtmlTableRow Parent) { System.Web.UI.HtmlControls.HtmlTableCell left = new System.Web.UI.HtmlControls.HtmlTableCell(); left.Attributes["class"] = "left"; System.Web.UI.HtmlControls.HtmlTableCell right = new System.Web.UI.HtmlControls.HtmlTableCell(); right.Attributes["class"] = "right"; System.Web.UI.HtmlControls.HtmlTableCell center = new System.Web.UI.HtmlControls.HtmlTableCell(); center.Attributes["class"] = "center"; Parent.Controls.Add(left); Parent.Controls.Add(center); Parent.Controls.Add(right); }
/// <summary> /// Procesar errores que se mostrarán en la parte superior a lo largo de toda la página, /// inmediatamente después del encabezado de la página, en los elementos <TR> y <SPAN> /// </summary> /// <param name="tr_Notify">Objeto <tr> del lado del servidor.</param> /// <param name="sp_Notify">Objeto <span> del lado del servidor.</param> /// <param name="strErrorMessage">Mensaje de error.</param> public void ShowPageErrorNotification(System.Web.UI.HtmlControls.HtmlTableRow tr_Notify, System.Web.UI.HtmlControls.HtmlGenericControl sp_Notify, string strErrorMessage) { //class="spErrorNotification" tr_Notify.Style["display"] = "block"; if (sp_Notify.InnerHtml == string.Empty) { sp_Notify.InnerHtml += "<ul style='padding-left: 1px; padding-bottom: 1px; margin-left: 1px; margin-top: 1px'>Ha ocurrido un error: "; } sp_Notify.InnerHtml += "<li style='margin-left: 20px;'>" + strErrorMessage + "</li>"; sp_Notify.Attributes["class"] = "spErrorNotification"; sp_Notify.Style["display"] = "block"; }
/// <summary> /// Procesar errores que se mostrarán en la parte superior a lo largo de toda la página, /// inmediatamente después del encabezado de la página, en los elementos <TR> y <SPAN> /// </summary> /// <param name="tr_Notify">Objeto <tr> del lado del servidor.</param> /// <param name="sp_Notify">Objeto <span> del lado del servidor.</param> /// <param name="strWariningHeader">Encabezado para el mensaje de advertencia.</param> /// <param name="strWariningMessage">Contenido del mensaje de advertencia.</param> public void ShowPageWarningNotification(System.Web.UI.HtmlControls.HtmlTableRow tr_Notify, System.Web.UI.HtmlControls.HtmlGenericControl sp_Notify, string strWarningHeader, string strWarningMessage) { tr_Notify.Style["display"] = "block"; if (sp_Notify.InnerHtml == string.Empty) { sp_Notify.InnerHtml += "<ul style='padding-left: 1px; padding-bottom: 1px; margin-bottom: 0px; margin-left: 1px; margin-top: 1px'>ADVERTENCIA(S): " + strWarningHeader; } sp_Notify.InnerHtml += "<li style='list-style-position: outside; margin-left: 20px;'>" + strWarningMessage + "</li>"; sp_Notify.Style["display"] = "block"; sp_Notify.Attributes["class"] = "spWarningNotification"; }
protected void btnManualMatchGo_Click(object sender, EventArgs e) { Button btnMatchGO = (Button)sender; GridEditableItem editedItem = btnMatchGO.NamingContainer as GridEditableItem; DropDownList ddlIssuer = (DropDownList)editedItem.FindControl("ddlIssuer"); RadGrid gvUnmatchedAllotments = (RadGrid)editedItem.FindControl("gvUnmatchedAllotments"); System.Web.UI.HtmlControls.HtmlTableRow trUnMatchedGrd = (System.Web.UI.HtmlControls.HtmlTableRow)editedItem.FindControl("trUnMatchedGrd"); System.Web.UI.HtmlControls.HtmlTableRow trUnMatchedBtns = (System.Web.UI.HtmlControls.HtmlTableRow)editedItem.FindControl("trUnMatchedBtns"); trUnMatchedGrd.Visible = true; trUnMatchedBtns.Visible = true; BindUnmatchedAllotmentsGrid(gvUnmatchedAllotments, Convert.ToInt32(ddlIssuer.SelectedValue)); }
void GenerateTableRowsFromSp1(String procedure, ref System.Web.UI.HtmlControls.HtmlTable table) { String Connstr = "SERVER=sql2005.iats.missouri.edu;Integrated Security = True;DATABASE=MU_BUS_TechServices_1;"; System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(Connstr); conn.Open(); System.Data.SqlClient.SqlCommand cmd2 = new System.Data.SqlClient.SqlCommand(); cmd2.Connection = conn; cmd2.CommandType = System.Data.CommandType.StoredProcedure; cmd2.CommandText = procedure; System.Data.SqlClient.SqlDataReader query = cmd2.ExecuteReader(); if (query.HasRows == true) { System.Data.DataTable dt = new System.Data.DataTable(); dt.Load(query); for (var i = 0; i < dt.Rows.Count; i++) { var row = dt.Rows[i]; var htmlRow = new System.Web.UI.HtmlControls.HtmlTableRow(); htmlRow.ID = i.ToString(); htmlRow.Attributes.Add("class", "data-row"); foreach (var col in dt.Columns) { var field = col.ToString(); if (!check_is_header(field)) { continue; } var tableCell = new System.Web.UI.HtmlControls.HtmlTableCell("td"); var content = row[field].ToString(); //if (dt.Columns.IndexOf(field) > row.ItemArray.Count() - 6 && content.Length > 0) content = content.Substring(0, content.IndexOf(" ")); var innerHtml = "<a href='AddFromLog.aspx?id=" + row.ItemArray[1] + "' target='_blank'><div>" + content + "</div></a>"; tableCell.InnerHtml = innerHtml; htmlRow.Cells.Add(tableCell); } table.Rows.Add(htmlRow); } } }
private void AddTitleToTable(DataObjects.Title title) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerHtml = "<a href='/bibliography/" + title.TitleID.ToString() + "'>" + title.ShortTitle + "</a>"; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); tblPages.Rows.Add(row); }
private void AddItemToTable(DataObjects.PageSummaryView psv) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerHtml = "<a href='/item/" + psv.ItemID.ToString() + "'>" + psv.ShortTitle + "</a>"; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = psv.Volume; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); tblPages.Rows.Add(row); }
private void AddItemToTable(DataObjects.PageSummaryView psv) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerHtml = "<a href='/item/" + psv.ItemID.ToString() + "'>" + psv.ShortTitle + "</a>"; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = psv.Volume; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); tblPages.Rows.Add(row); }
// The next two functions simply create the html for the status tables. You can safely ignore these. protected void CreateStatusTable(DocuSignAPI.FilteredEnvelopeStatuses statuses) { foreach (DocuSignAPI.EnvelopeStatus status in statuses.EnvelopeStatuses) { System.Web.UI.HtmlControls.HtmlGenericControl containerDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); System.Web.UI.HtmlControls.HtmlGenericControl info = new System.Web.UI.HtmlControls.HtmlGenericControl("p"); info.InnerHtml = "<a href=\"javascript:toggle('" + status.EnvelopeID + "_Detail" + "');\"><img src=\"images/plus.png\"></a> " + status.Subject + " (" + status.Status.ToString() + ") - " + status.EnvelopeID; containerDiv.Controls.Add(info); System.Web.UI.HtmlControls.HtmlGenericControl envelopeDetail = CreateEnvelopeTable(status); envelopeDetail.Attributes["class"] = "detail"; envelopeDetail.Attributes["id"] = status.EnvelopeID + "_Detail"; containerDiv.Controls.Add(envelopeDetail); System.Web.UI.HtmlControls.HtmlTableRow tr = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell tc = new System.Web.UI.HtmlControls.HtmlTableCell(); tc.Controls.Add(containerDiv); tr.Cells.Add(tc); statusTable.Rows.Add(tr); } }
private void bindmmAuditingReport1() { List <DataTable> SelectedReports = exportreport.GetSelectedDataTable(); // Runs all of the selected reports (selections stored in Session variable). for (int i = 0; i < exportreport.DataTableList.Count; i++) { string reportname = string.Empty; Label lblsetreporttitle = new Label(); lblsetreporttitle.Font.Bold = true; lblsetreporttitle.Font.Size = 12; System.Web.UI.HtmlControls.HtmlTableRow tbrow = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell tbcol = new System.Web.UI.HtmlControls.HtmlTableCell(); //bool hasValue = DDRSessionEntity.Current.checkcount.TryGetValue((i + 1).ToString(), out reportname); //tbcol.InnerText = reportname; //lblsetreporttitle.Text = reportname; lblsetreporttitle.Text = SelectedReports.ElementAt(i).TableName; tbcol.Controls.Add(lblsetreporttitle); tbrow.Cells.Add(tbcol); rpttable.Rows.Add(tbrow); //Create blank row System.Web.UI.HtmlControls.HtmlTableRow tbblankrow = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell tbblankcol = new System.Web.UI.HtmlControls.HtmlTableCell(); tbblankcol.Height = "15"; tbblankrow.Cells.Add(tbblankcol); rpttable.Rows.Add(tbblankrow); //Initialize the grid with data. GridView reportgrdi = new GridView(); reportgrdi = GridStyle(); reportgrdi.DataSource = SelectedReports.ElementAt(i);//MMAuditingbindtableheader(); reportgrdi.DataBind(); if (SelectedReports.ElementAt(i).Rows.Count > 0) { reportgrdi.Rows[0].Cells[0].Width = 250; } System.Web.UI.HtmlControls.HtmlTableRow tbrowtable = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell tbcoltable = new System.Web.UI.HtmlControls.HtmlTableCell(); tbcoltable.Controls.Add(reportgrdi); tbrowtable.Cells.Add(tbcoltable); rpttable.Rows.Add(tbrowtable); } }
/// <summary> /// 判断才菜单的权限 /// </summary> /// <param name="menusession"></param> private void JudgeMenu(string menusession) { try { if (menusession.Length > 0) { string[] menuarray = menusession.Split(';'); for (int i = 0; i < menuarray.Length; i++) { string menuName = menuarray[i].ToString(); System.Web.UI.HtmlControls.HtmlTableRow tr = (System.Web.UI.HtmlControls.HtmlTableRow) this.form1.FindControl(menuName); if (tr != null) { tr.Visible = true; } } } } catch { } }
private void AddPageToTable(DataObjects.Page page) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerHtml = "<a href='/page/" + page.PageID.ToString() + "'>" + page.ShortTitle + "</a>"; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.Volume; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.Issue; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.Year; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerText = page.IndicatedPages; row.Cells.Add(cell); tblPages.Rows.Add(row); }
protected override void CreateChildControls() { Controls.Clear(); System.Web.UI.HtmlControls.HtmlTableRow title = new System.Web.UI.HtmlControls.HtmlTableRow(); title.Attributes["class"] = "title"; System.Web.UI.HtmlControls.HtmlTableRow content = new System.Web.UI.HtmlControls.HtmlTableRow(); content.Attributes["class"] = "content"; System.Web.UI.HtmlControls.HtmlTableRow footer = new System.Web.UI.HtmlControls.HtmlTableRow(); footer.Attributes["class"] = "footer"; CreateSubControls(title); CreateSubControls(content); CreateSubControls(footer); CreateTitle((System.Web.UI.HtmlControls.HtmlTableCell)(title.Controls[1])); CreateContents((System.Web.UI.HtmlControls.HtmlTableCell)(content.Controls[1])); Controls.Add(title); Controls.Add(content); Controls.Add(footer); }
private string ExportToCSV() { System.Text.StringBuilder sb = new System.Text.StringBuilder(); //-------------------------------- slice--------------------------------------- Hierarchy[] hiers = this.Axes[2].Hierarchies.ToSortedByUniqueNameArray(); for (int i = 0; i < hiers.Length; i++) { Hierarchy hier = hiers[i]; //not displaying without mems if (hier.FilterMember == null) { continue; } DataMember mem = hier.FilterMember; //not displaying only with "All" members if (mem.LevelDepth == 0 && !(mem is CalculatedMember) && hier.Levels[0].IsAllLevel) { continue; } // add hier and mem sb.Append(hier.DisplayName); sb.Append(": "); Olap.CalculatedMemberTemplates.MembersAggregate aggMem = mem as Olap.CalculatedMemberTemplates.MembersAggregate; if (aggMem != null) //if aggregate, show children instead of agg itself { for (int j = 0; j < aggMem.Members.Count; j++) { sb.Append(aggMem.Members[j].Name); if (j < aggMem.Members.Count - 1) { sb.Append(", "); } } } else { sb.Append(mem.Name); } sb.Append("\r\n"); } sb.Append("\r\n"); //----------------------------------------------------------------------------- int Ax0MemCount = this.Cellset.Axis0TupleMemCount; int Ax1MemCount = this.Cellset.Axis1TupleMemCount; int Ax0PosCount = this.Cellset.Axis0PosCount; int Ax1PosCount = this.Cellset.Axis1PosCount; Hierarchy ax1Hier = null; Hierarchy ax0Hier = null; //-------------------------------- table--------------------------------------- System.Web.UI.HtmlControls.HtmlTableRow tr = null; System.Web.UI.HtmlControls.HtmlTableCell td = null; if (this.Cellset.IsValid == false) { return("Cellset contains no data"); } for (int i = 0; i < Ax0MemCount; i++) { for (int j = 0; j < Ax1MemCount; j++) { //hier uname in last row if (i == Ax0MemCount - 1) { sb.Append(this.Axes[1].Hierarchies[j].DisplayName); } sb.Append("\t"); } ax0Hier = this.Axes[0].Hierarchies[i]; for (int j = 0; j < Ax0PosCount; j++) { CellsetMember mem = this.Cellset.GetCellsetMember(0, i, j); sb.Append(mem.Name); sb.Append("\t"); } // hier name in last col sb.Append(ax0Hier.DisplayName); sb.Append("\r\n"); } for (int i = 0; i < Ax1PosCount; i++) { for (int j = 0; j < Ax1MemCount; j++) { ax1Hier = this.Axes[1].Hierarchies[j]; CellsetMember mem = this.Cellset.GetCellsetMember(1, j, i); sb.Append(mem.Name); sb.Append("\t"); } for (int j = 0; j < Ax0PosCount; j++) { Cell olapCell = this.Cellset.GetCell(j, i); sb.Append(olapCell.FormattedValue.Replace(System.Globalization.NumberFormatInfo.CurrentInfo.NumberGroupSeparator, "")); sb.Append("\t"); } sb.Append("\r\n"); } return(sb.ToString()); }
private void LinkControls(ControlCollection ctrls) { foreach (Control ctrl in ctrls) { switch (ctrl.ID) { case "tgQR": tgQR = (Toggle)ctrl; tgQR.ImagePath = ThemePath; break; case "tgdQR": tgdQR = (ToggleDisplay)ctrl; break; case "plhMessage": plhMessage = (PlaceHolder)ctrl; break; case "reqUserName": reqUserName = (System.Web.UI.WebControls.RequiredFieldValidator)ctrl; break; case "txtUserName": txtUserName = (System.Web.UI.HtmlControls.HtmlInputText)ctrl; break; case "reqBody": reqBody = (Label)ctrl; break; case "reqSecurityCode": reqSecurityCode = (Label)ctrl; break; case "chkSubscribe": chkSubscribe = (CheckBox)ctrl; break; case "ambtnSubmit": ambtnSubmit = (ImageButton)ctrl; break; case "btnSubmit": btnSubmit = (System.Web.UI.HtmlControls.HtmlInputButton)ctrl; break; case "trUsername": trUsername = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl; break; case "trCaptcha": trCaptcha = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl; break; case "trSubscribe": trSubscribe = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl; break; } if (ctrl is Controls.ControlsBase) { ((Controls.ControlsBase)ctrl).ControlConfig = this.ControlConfig; } if (ctrl.Controls.Count > 0) { LinkControls(ctrl.Controls); } } }
/// <summary> /// Creates the body. /// </summary> /// <returns></returns> /// <Remarks> /// Created Time: 2008-7-21 15:58 /// Created By: jack_que /// Last Modified Time: /// Last Modified By: /// </Remarks> public StringBuilder CreateBody() { StringBuilder builder = new StringBuilder(); System.Web.UI.HtmlControls.HtmlTable table = new System.Web.UI.HtmlControls.HtmlTable(); DataTable dt = this.dataSource.Tables[0]; bool flag = false; if (this.dataSource != null) { //处理有分区的行 for (int i = 0; i < report.Rows.Count; i++) { System.Web.UI.HtmlControls.HtmlTableRow tr1 = null; System.Web.UI.HtmlControls.HtmlTableRow tr = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell td = new System.Web.UI.HtmlControls.HtmlTableCell(); td.InnerText = report.Rows[i].Header.HeaderText; td.RowSpan = report.Rows[i].RowSpan; tr.Cells.Add(td); for (int n = 0; n < dt.Rows.Count; n++) { DataRow row = dt.Rows[n]; tr1 = new System.Web.UI.HtmlControls.HtmlTableRow(); if (row[0].ToString() == report.Rows[i].Header.HeaderValue) { for (int j = 1; j < dt.Columns.Count; j++) { DataColumn column = dt.Columns[j]; System.Web.UI.HtmlControls.HtmlTableCell td1 = new System.Web.UI.HtmlControls.HtmlTableCell(); td1.InnerText = row[column].ToString(); if (j == 1) tr.Cells.Add(td1); else { tr1.Cells.Add(td1); } flag = true; } } if (flag) { if (n == 0) table.Rows.Add(tr); else table.Rows.Add(tr1); dt.Rows.RemoveAt(i); } } } //处理余下的行 for (int i = 0; i < dt.Rows.Count; i++) { System.Web.UI.HtmlControls.HtmlTableRow tr = new System.Web.UI.HtmlControls.HtmlTableRow(); DataRow row = dt.Rows[i]; for (int j = 0; j < dt.Columns.Count; j++) { DataColumn column = dt.Columns[j]; System.Web.UI.HtmlControls.HtmlTableCell td = new System.Web.UI.HtmlControls.HtmlTableCell(); td.RowSpan = 1; td.ColSpan = 1; td.InnerText = row[column].ToString(); tr.Cells.Add(td); } table.Rows.Add(tr); } } builder.Append("<tbody>"); for (int i = 0; i < table.Rows.Count; i++) { builder.Append("<tr>"); for (int j = 0; j < table.Rows[i].Cells.Count; j++) { builder.Append("<td style='font:11' rowspan=" + table.Rows[i].Cells[j].RowSpan + ">"); builder.Append(table.Rows[i].Cells[j].InnerText); builder.Append("</td>"); } builder.Append("</tr>"); } builder.Append("</tbody>"); return builder; //StringBuilder builder = new StringBuilder(); //System.Web.UI.HtmlControls.HtmlTable table = new System.Web.UI.HtmlControls.HtmlTable(); //if (this.dataSource != null) //{ // DataTable dt = this.dataSource.Tables[0]; // for (int i = 0; i < dt.Rows.Count; i++) // { // DataRow row = dt.Rows[i]; // builder.Append("<tr>"); // for (int j = 0; j < dt.Columns.Count; j++) // { // DataColumn column = dt.Columns[j]; // builder.Append("<td>").Append(row[column].ToString()).Append("</td>"); // } // builder.Append("</tr>"); // } //} //return builder; }
protected void Page_Load(object sender, EventArgs e) { List <string> idList = (List <string>)Session["cart"]; if (idList == null) { idList = new List <string>(); } string provider = "Microsoft.ACE.OLEDB.12.0"; // the data source for Access database if it's placed in the 'App_Data' folder of the // current project when run within Citrix //string dataSource = "\\\\itfs1\\wpcarey\\StudentHomeFolders\\apedroz1\\Documents\\A2ZBooks.accdb"; //string dataSource = "C:\\Users\\jdpiasecki\\Downloads\\A2ZBooks\\A2ZBooks\\A2ZBooks\\a2zbooks.accdb"; string dataSource = Server.MapPath("a2zbooks.accdb"); string dbConnectionString = string.Format("Provider={0};Data Source={1};", provider, dataSource); OleDbConnection myConn = new OleDbConnection(dbConnectionString); myConn.Open(); string idVal = "("; foreach (string s in idList) { idVal += s + ","; } string query = "SELECT * FROM book WHERE ID IN " + idVal + ")"; OleDbCommand cmd = new OleDbCommand(query, myConn); var reader = cmd.ExecuteReader(); double sum = 0; while (reader.Read()) { string author = reader["Author"].ToString(); // get data from the 'Author' column string title = reader["Title"].ToString(); string isbn = reader["ISBN"].ToString(); string price = reader["Price"].ToString(); //string courseID = reader["Course ID"].ToString(); int bookCount = 0; foreach (string s in idList) { if (s == reader["ID"].ToString()) { bookCount++; } } string quantity = reader["Quantity"].ToString(); var newRow = new System.Web.UI.HtmlControls.HtmlTableRow(); var newCell = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell.InnerText = author; newRow.Cells.Add(newCell); var newCell1 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell1.InnerText = title; newRow.Cells.Add(newCell1); var newCell4 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell4.InnerText = string.Format("{0:C2}", Double.Parse(price)); newRow.Cells.Add(newCell4); var newCell5 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell5.InnerText = bookCount.ToString(); newRow.Cells.Add(newCell5); var newCell6 = new System.Web.UI.HtmlControls.HtmlTableCell(); double tmpPrice = double.Parse(price); tmpPrice = tmpPrice * bookCount; newCell6.InnerText = string.Format("{0:C2}", tmpPrice); sum += tmpPrice; newRow.Cells.Add(newCell6); results.Rows.Add(newRow); }//end of while var anotherRow = new System.Web.UI.HtmlControls.HtmlTableRow(); for (int i = 0; i < 4; i++) { anotherRow.Cells.Add(new System.Web.UI.HtmlControls.HtmlTableCell()); } var cellTotal = new System.Web.UI.HtmlControls.HtmlTableCell(); cellTotal.InnerHtml = "<strong>" + string.Format("{0:C2}", sum) + "</strong>"; anotherRow.Cells.Add(cellTotal); results.Rows.Add(anotherRow); }
// private string m_extractionlayers;// needs to be array // private bool m_inputPolyAllowed; // private string m_jsonServiceLayers = "{}"; public string LoadConfigurator(ESRI.ArcGIS.Server.IServerContext serverContext, System.Collections.Specialized.NameValueCollection ServerObjectProperties, System.Collections.Specialized.NameValueCollection ExtensionProperties, System.Collections.Specialized.NameValueCollection InfoProperties, bool isEnabled, string servicesEndPoint, string serviceName, string serviceTypeName) { logger.LogMessage(ServerLogger.msgType.warning, "SOE manager page", 8000, "SOE Manager page: Loading"); // Just return a message if the SOE is not enabled on the current service. if (!isEnabled) return ("<span>No Properties to configure, sorry</span>"); // Initialize member variables holding the SOE's properties. if (!string.IsNullOrEmpty(ExtensionProperties["FlowAccum"])){ m_flowacc = ExtensionProperties["FlowAccum"]; } if (!string.IsNullOrEmpty(ExtensionProperties["FlowDir"])){ m_flowdir = ExtensionProperties["FlowDir"]; } //if (!(ExtensionProperties["ExtractionLayers"] == null || ExtensionProperties["ExtractionLayers"].Length==0)) //{ // m_extractionlayers = ExtensionProperties["ExtractionLayers"]; // } //Container div and table. System.Web.UI.HtmlControls.HtmlGenericControl propertiesDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("propertiesDiv"); propertiesDiv.Style[System.Web.UI.HtmlTextWriterStyle.Padding] = "10px"; System.Web.UI.HtmlControls.HtmlTable table = new System.Web.UI.HtmlControls.HtmlTable(); table.CellPadding = table.CellSpacing = 4; propertiesDiv.Controls.Add(table); // Header row. System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); table.Rows.Add(row); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell.ColSpan = 2; System.Web.UI.WebControls.Label lbl = new System.Web.UI.WebControls.Label(); lbl.Text = "Choose the flow accumulation and flow direction layers."; cell.Controls.Add(lbl); // Flow Acc Layer drop-down row. row = new System.Web.UI.HtmlControls.HtmlTableRow(); table.Rows.Add(row); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); lbl = new System.Web.UI.WebControls.Label(); cell.Controls.Add(lbl); lbl.Text = "Flow Accumulation:"; cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell.Controls.Add(m_FlowAccDropDown); m_FlowAccDropDown.ID = "flowAccDropDown"; // Wire the OnLayerChanged JavaScript function (defined in SupportingJavaScript) to fire when a new layer is selected. m_FlowAccDropDown.Attributes["onchange"] = "ExtensionConfigurator.OnLayerChanged(this);"; // Flow dir layer drop-down row. row = new System.Web.UI.HtmlControls.HtmlTableRow(); table.Rows.Add(row); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); lbl = new System.Web.UI.WebControls.Label(); cell.Controls.Add(lbl); lbl.Text = "Flow Direction:"; cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell.Controls.Add(m_FlowDirDropDown); m_FlowDirDropDown.ID = "flowDirDropDown"; // Get the path of the underlying map document and use it to populate the properties drop-downs. string fileName = ServerObjectProperties["FilePath"]; populateDropDowns(serverContext, fileName); // Render and return the HTML for the container div. System.IO.StringWriter stringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWriter = new System.Web.UI.HtmlTextWriter (stringWriter); propertiesDiv.RenderControl(htmlWriter); string html = stringWriter.ToString(); stringWriter.Close(); return html; }
private void AddTitleToTable(DataObjects.Title title) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); cell.InnerHtml = "<a href='/bibliography/" + title.TitleID.ToString() + "'>" + title.ShortTitle + "</a>"; row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); tblPages.Rows.Add(row); }
public void rptLostTime_OnItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { //int minRowsToValidate = 1; try { INCFORM_LOSTTIME_HIST losttime = (INCFORM_LOSTTIME_HIST)e.Item.DataItem; RadDropDownList rddlw = (RadDropDownList)e.Item.FindControl("rddlWorkStatus"); //rddlw.SelectedIndexChanged += rddlw_SelectedIndexChanged; TextBox tbr = (TextBox)e.Item.FindControl("tbRestrictDesc"); RadDatePicker bd = (RadDatePicker)e.Item.FindControl("rdpBeginDate"); bd = SQMBasePage.SetRadDateCulture(bd, ""); RadDatePicker md = (RadDatePicker)e.Item.FindControl("rdpNextMedDate"); md = SQMBasePage.SetRadDateCulture(md, ""); RadDatePicker ed = (RadDatePicker)e.Item.FindControl("rdpExpectedReturnDT"); ed = SQMBasePage.SetRadDateCulture(ed, ""); RadButton itmdel = (RadButton)e.Item.FindControl("btnItemDelete"); System.Web.UI.HtmlControls.HtmlTableRow trMd = (System.Web.UI.HtmlControls.HtmlTableRow)e.Item.FindControl("trNextMedDate"); System.Web.UI.HtmlControls.HtmlTableRow trEd = (System.Web.UI.HtmlControls.HtmlTableRow)e.Item.FindControl("trExpectedReturnDate"); rddlw.Items.Add(new DropDownListItem("", "")); List <EHSMetaData> statuses = EHSMetaDataMgr.SelectMetaDataList("WORK_STATUS"); foreach (var s in statuses) { rddlw.Items.Add(new DropDownListItem(s.Text, s.Value)); } if (losttime.WORK_STATUS != null) { rddlw.SelectedValue = losttime.WORK_STATUS; } rddlw.SelectedValue = losttime.WORK_STATUS; tbr.Text = losttime.ITEM_DESCRIPTION; bd.SelectedDate = losttime.BEGIN_DT; //rd.SelectedDate = losttime.RETURN_TOWORK_DT; md.SelectedDate = losttime.NEXT_MEDAPPT_DT; ed.SelectedDate = losttime.RETURN_EXPECTED_DT; // Set user access: rddlw.Enabled = tbr.Enabled = bd.Enabled = md.Enabled = ed.Enabled = itmdel.Visible = PageMode == PageUseMode.ViewOnly ? false : SessionManager.CheckUserPrivilege(SysPriv.originate, SysScope.incident); switch (rddlw.SelectedValue) { case "": tbr.Visible = true; bd.Visible = true; //rd.Visible = false; md.Visible = trMd.Visible = false; ed.Visible = trEd.Visible = false; break; case "01": // Return Restricted Duty tbr.Visible = true; bd.Visible = true; //rd.Visible = false; md.Visible = true; ed.Visible = trEd.Visible = false; //rvfr.Enabled = true; break; case "02": // Return to Work tbr.Visible = true; bd.Visible = true; //rd.Visible = false; md.Visible = trMd.Visible = false; ed.Visible = trEd.Visible = false; break; case "03": // Additional Lost Time tbr.Visible = true; bd.Visible = true; //rd.Visible = false; md.Visible = true; ed.Visible = true; //rvfr.Enabled = true; break; } } catch { } } // btnAddLostTime.Visible = SessionManager.CheckUserPrivilege(SysPriv.originate, SysScope.incident); btnSave.Visible = PageMode == PageUseMode.ViewOnly ? false : EHSIncidentMgr.CanUpdateIncident(null, true, SysPriv.action, WorkStatusIncident.INCFORM_LAST_STEP_COMPLETED); // can log lost time ? if (btnSave.Visible == false) { btnSave.Visible = PageMode == PageUseMode.ViewOnly ? false : EHSIncidentMgr.CanUpdateIncident(null, true, SysPriv.config, WorkStatusIncident.INCFORM_LAST_STEP_COMPLETED); // check if has closed incident priv } btnAddLostTime.Visible = btnSave.Visible; if (hfContext.Value == "embeded") { btnSave.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { string searchTerm = (string)Session["searchTerm"]; string searchCategory = (string)Session["category"]; // components for a connection string to an Access 2016 named 'SampleDB.accdb' string provider = "Microsoft.ACE.OLEDB.12.0"; // the data source for Access database if it's placed in the 'App_Data' folder of the // current project when run within Citrix string dataSource = "\\\\itfs1\\wpcarey\\StudentHomeFolders\\kroumina\\Documents\\VisualStudio2017\\Projects\\A2ZBooks\\A2ZBooks\\A2ZBooks.accdb"; //string dataSource = "C:\\Users\\jdpiasecki\\Downloads\\A2ZBooks\\A2ZBooks\\A2ZBooks\\a2zbooks.accdb"; //string dataSource = Server.MapPath("a2zbooks.accdb"); string dbConnectionString = string.Format("Provider={0};Data Source={1};", provider, dataSource); OleDbConnection myConn = new OleDbConnection(dbConnectionString); myConn.Open(); searchResultsLabel.Text = "Search results for " + searchCategory + " = '" + searchTerm + "'"; { string query = "SELECT * FROM book WHERE " + searchCategory + " like '%" + searchTerm + "%'"; // the SampleDB Access database has a table named 'practice' if (searchCategory == "Course Number") { query = "SELECT * FROM book WHERE ID IN (SELECT BookID FROM bookcoursebridge WHERE CourseID IN (SELECT ID FROM course WHERE CODE like '%" + searchTerm + "%') )"; } OleDbCommand cmd = new OleDbCommand(query, myConn); var reader = cmd.ExecuteReader(); while (reader.Read()) { string author = reader["Author"].ToString(); // get data from the 'Author' column string title = reader["Title"].ToString(); string isbn = reader["ISBN"].ToString(); string price = reader["Price"].ToString(); //string courseID = reader["Course ID"].ToString(); string quantity = reader["Quantity"].ToString(); Button newButton = new Button(); newButton.Text = "Add to Cart"; newButton.Click += NewButton_Click; newButton.ID = "btn" + reader["ID"].ToString(); var newRow = new System.Web.UI.HtmlControls.HtmlTableRow(); var newCell = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell.InnerText = author; newRow.Cells.Add(newCell); var newCell1 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell1.InnerText = title; newRow.Cells.Add(newCell1); var newCell2 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell2.InnerText = isbn; newRow.Cells.Add(newCell2); var newCell4 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell4.InnerText = string.Format("{0:C2}", double.Parse(price)); newRow.Cells.Add(newCell4); var newCell5 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell5.InnerText = quantity; newRow.Cells.Add(newCell5); var newCell6 = new System.Web.UI.HtmlControls.HtmlTableCell(); newCell6.Controls.Add(newButton); newRow.Cells.Add(newCell6); results.Rows.Add(newRow); } //end of while } //end of if }
// private string m_extractionlayers;// needs to be array // private bool m_inputPolyAllowed; // private string m_jsonServiceLayers = "{}"; public string LoadConfigurator(ESRI.ArcGIS.Server.IServerContext serverContext, System.Collections.Specialized.NameValueCollection ServerObjectProperties, System.Collections.Specialized.NameValueCollection ExtensionProperties, System.Collections.Specialized.NameValueCollection InfoProperties, bool isEnabled, string servicesEndPoint, string serviceName, string serviceTypeName) { logger.LogMessage(ServerLogger.msgType.warning, "SOE manager page", 8000, "SOE Manager page: Loading"); // Just return a message if the SOE is not enabled on the current service. if (!isEnabled) { return("<span>No Properties to configure, sorry</span>"); } // Initialize member variables holding the SOE's properties. if (!string.IsNullOrEmpty(ExtensionProperties["FlowAccum"])) { m_flowacc = ExtensionProperties["FlowAccum"]; } if (!string.IsNullOrEmpty(ExtensionProperties["FlowDir"])) { m_flowdir = ExtensionProperties["FlowDir"]; } //if (!(ExtensionProperties["ExtractionLayers"] == null || ExtensionProperties["ExtractionLayers"].Length==0)) //{ // m_extractionlayers = ExtensionProperties["ExtractionLayers"]; // } //Container div and table. System.Web.UI.HtmlControls.HtmlGenericControl propertiesDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("propertiesDiv"); propertiesDiv.Style[System.Web.UI.HtmlTextWriterStyle.Padding] = "10px"; System.Web.UI.HtmlControls.HtmlTable table = new System.Web.UI.HtmlControls.HtmlTable(); table.CellPadding = table.CellSpacing = 4; propertiesDiv.Controls.Add(table); // Header row. System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); table.Rows.Add(row); System.Web.UI.HtmlControls.HtmlTableCell cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell.ColSpan = 2; System.Web.UI.WebControls.Label lbl = new System.Web.UI.WebControls.Label(); lbl.Text = "Choose the flow accumulation and flow direction layers."; cell.Controls.Add(lbl); // Flow Acc Layer drop-down row. row = new System.Web.UI.HtmlControls.HtmlTableRow(); table.Rows.Add(row); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); lbl = new System.Web.UI.WebControls.Label(); cell.Controls.Add(lbl); lbl.Text = "Flow Accumulation:"; cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell.Controls.Add(m_FlowAccDropDown); m_FlowAccDropDown.ID = "flowAccDropDown"; // Wire the OnLayerChanged JavaScript function (defined in SupportingJavaScript) to fire when a new layer is selected. m_FlowAccDropDown.Attributes["onchange"] = "ExtensionConfigurator.OnLayerChanged(this);"; // Flow dir layer drop-down row. row = new System.Web.UI.HtmlControls.HtmlTableRow(); table.Rows.Add(row); cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); lbl = new System.Web.UI.WebControls.Label(); cell.Controls.Add(lbl); lbl.Text = "Flow Direction:"; cell = new System.Web.UI.HtmlControls.HtmlTableCell(); row.Cells.Add(cell); cell.Controls.Add(m_FlowDirDropDown); m_FlowDirDropDown.ID = "flowDirDropDown"; // Get the path of the underlying map document and use it to populate the properties drop-downs. string fileName = ServerObjectProperties["FilePath"]; populateDropDowns(serverContext, fileName); // Render and return the HTML for the container div. System.IO.StringWriter stringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWriter = new System.Web.UI.HtmlTextWriter (stringWriter); propertiesDiv.RenderControl(htmlWriter); string html = stringWriter.ToString(); stringWriter.Close(); return(html); }
protected override void CreateContent(System.Web.UI.Control NamingContainer, System.Web.UI.ControlCollection content) { var hinweis = new HtmlCtrl.P() { InnerText = EmptyDataText, CssStyleBld = EmptyDataTextStyle }; content.Add(hinweis); content.Add(new HtmlCtrl.BR()); var btnRemove = new Button() { Text = RemoveButtonCaption }; btnRemove.Attributes.Add("style", RemoveButtonStyle.ToString()); btnRemove.Click += new EventHandler(btnRemove_Click); content.Add(btnRemove); content.Add(new HtmlCtrl.BR()); // Alle aktuell gültigen Filter auflisten var fltTab = new System.Web.UI.HtmlControls.HtmlTable(); content.Add(fltTab); fltTab.Attributes.Add("style", CurrentlyActiveFiltersTabStyle.ToString()); var header = new System.Web.UI.HtmlControls.HtmlTableRow(); fltTab.Rows.Add(header); var col1Header = new System.Web.UI.HtmlControls.HtmlTableCell() { InnerText = "Filter" }; header.Cells.Add(col1Header); var col1HeaderCssBld = new css.StyleBuilder(CurrentlyActiveFiltersTabCellDescription); col1HeaderCssBld.FontWeight = new css.FontWeightMeasure() { Value = css.FontWeightMeasure.Unit.bold }; col1Header.Attributes.Add("style", col1HeaderCssBld.ToString()); var col2Header = new System.Web.UI.HtmlControls.HtmlTableCell() { InnerText = "entfernen ja/nein" }; header.Cells.Add(col2Header); var col2HeaderCssBld = new css.StyleBuilder(CurrentlyActiveFiltersTabCellAction); col2HeaderCssBld.FontWeight = new css.FontWeightMeasure() { Value = css.FontWeightMeasure.Unit.bold }; col2Header.Attributes.Add("style", col2HeaderCssBld.ToString()); int line = 0; foreach (var flt in sessVar.Filters) { var row = new System.Web.UI.HtmlControls.HtmlTableRow(); fltTab.Rows.Add(row); var descr = new System.Web.UI.HtmlControls.HtmlTableCell() { InnerText = flt.Value.Description }; descr.Attributes.Add("style", CurrentlyActiveFiltersTabCellDescription.ToString()); row.Cells.Add(descr); var action = new System.Web.UI.HtmlControls.HtmlTableCell(); action.Attributes.Add("style", CurrentlyActiveFiltersTabCellAction.ToString()); action.Controls.Add(new CheckBox() { ID = "cbxCtrl" + line++, ClientIDMode = ClientIDMode.Static, Checked = true }); row.Cells.Add(action); } }
// Add the recipients to the UI protected void AddRecipients(DocuSignAPI.Recipient[] recipients) { int i = 1; foreach (DocuSignAPI.Recipient recipient in recipients) { var row = new System.Web.UI.HtmlControls.HtmlTableRow(); var roleCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var nameCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var emailCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var securityCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var inviteCell = new System.Web.UI.HtmlControls.HtmlTableCell(); roleCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" readonly=\"true\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientRole, i.ToString(), recipient.RoleName); nameCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientName, i.ToString(), recipient.UserName); emailCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientEmail, i.ToString(), recipient.Email); string security = String.Empty; if (!String.IsNullOrEmpty(recipient.AccessCode)) { security = "Access code: " + recipient.AccessCode; } else if (null != recipient.PhoneAuthentication) { security = "Phone Authentication"; } else if (recipient.RequireIDLookup) { security = "ID Check"; } else { security = "None"; } securityCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" readonly=\"true\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientSecurity, i.ToString(), security); inviteCell.InnerHtml = String.Format( "<ul class=\"switcher\" name=\"{0}{1}\" ><li class=\"active\"><a href=\"#\" title=\"On\">ON</a></li><li><a href=\"#\" title=\"OFF\">OFF</a></li><input id=\"RecipientInviteToggle{1}\" name=\"RecipientInviteToggle{1}\" value=\"RecipientInviteToggle{1}\" type=\"checkbox\" checked=\"\" style=\"display: none\"></ul>", Keys.RecipientInvite, i.ToString()); //<ul class="switcher" id="RecipientInvite1"> // <li id="RecipientInviteon1" class="active"><a href="#" title="On">ON</a></li> // <li id="RecipientInviteoff1"><a href="#" title="OFF">OFF</a></li> // <input id="RecipientInviteToggle1" name="RecipientInviteToggle1" value="RecipientInviteToggle1" type="checkbox" checked="" style="display: none"> //</ul> inviteCell.Attributes[Keys.Id] = String.Format("{0}{1}", Keys.RecipientInvite, recipient.ID); inviteCell.Attributes[Keys.Name] = String.Format("{0}{1}", Keys.RecipientInvite, recipient.ID); row.Cells.Add(roleCell); row.Cells.Add(nameCell); row.Cells.Add(emailCell); row.Cells.Add(securityCell); row.Cells.Add(inviteCell); RecipientTable.Rows.Add(row); i++; } }
// Add the recipients to the UI protected void AddRecipients(DocuSignAPI.Recipient[] recipients) { int i = 1; foreach (DocuSignAPI.Recipient recipient in recipients) { var row = new System.Web.UI.HtmlControls.HtmlTableRow(); var roleCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var nameCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var emailCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var securityCell = new System.Web.UI.HtmlControls.HtmlTableCell(); var inviteCell = new System.Web.UI.HtmlControls.HtmlTableCell(); roleCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" readonly=\"true\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientRole, i.ToString(), recipient.RoleName); nameCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientName, i.ToString(), recipient.UserName); emailCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientEmail, i.ToString(), recipient.Email); string security = String.Empty; if (!String.IsNullOrEmpty(recipient.AccessCode)) { security = "Access code: " + recipient.AccessCode; } else if (null != recipient.PhoneAuthentication) { security = "Phone Authentication"; } else if (recipient.RequireIDLookup) { security = "ID Check"; } else { security = "None"; } securityCell.InnerHtml = String.Format( "<input id=\"{0}\" type=\"text\" readonly=\"true\" name=\"{0}{1}\" value=\"{2}\"/>", Keys.RecipientSecurity, i.ToString(), security); inviteCell.InnerHtml = String.Format( "<ul class=\"switcher\" name=\"{0}{1}\" ><li class=\"active\"><a href=\"#\" title=\"On\">ON</a></li><li><a href=\"#\" title=\"OFF\">OFF</a></li><input id=\"RecipientInviteToggle{1}\" name=\"RecipientInviteToggle{1}\" value=\"RecipientInviteToggle{1}\" type=\"checkbox\" checked=\"\" style=\"display: none\"></ul>", Keys.RecipientInvite, i.ToString()); //<ul class="switcher" id="RecipientInvite1"> // <li id="RecipientInviteon1" class="active"><a href="#" title="On">ON</a></li> // <li id="RecipientInviteoff1"><a href="#" title="OFF">OFF</a></li> // <input id="RecipientInviteToggle1" name="RecipientInviteToggle1" value="RecipientInviteToggle1" type="checkbox" checked="" style="display: none"> //</ul> inviteCell.Attributes[Keys.Id] = String.Format("{0}{1}", Keys.RecipientInvite,recipient.ID); inviteCell.Attributes[Keys.Name] = String.Format("{0}{1}", Keys.RecipientInvite,recipient.ID); row.Cells.Add(roleCell); row.Cells.Add(nameCell); row.Cells.Add(emailCell); row.Cells.Add(securityCell); row.Cells.Add(inviteCell); RecipientTable.Rows.Add(row); i++; } }
protected void btEnviar_Click(object sender, EventArgs e) { if (this.ddlConexion.SelectedItem.Value == "") { MyMaster.AlertaMostrar("Seleccione la conexión"); return; } var vl_isoTrama = new ISO8583.Iso8583(this.lbMTI.Text); for (int vl_iContador = 2; vl_iContador <= 128; vl_iContador++) { System.Web.UI.HtmlControls.HtmlTableRow vl_trCampo = (System.Web.UI.HtmlControls.HtmlTableRow)pnSimular.FindControl("trCampo" + vl_iContador.ToString()); if (vl_trCampo.Visible) { TextBox vl_tbCampo = (TextBox)pnSimular.FindControl("tbCampo" + vl_iContador.ToString()); var vl_cValidaCampo = vl_isoTrama.adicionarCampoDatos(vl_iContador, vl_tbCampo.Text); } } DateTime vl_dtInicio, vl_dtFin; int m_iBytes = 0; byte[] m_aBuffer = new byte[8000]; byte[] newArray; string[] vl_sDetalleConexion = this.ddlConexion.SelectedItem.Value.Split('|'); byte[] vl_baTrama = vl_isoTrama.obtieneTramaBytes(); this.tbTrama.Text = System.Text.Encoding.ASCII.GetString(vl_baTrama, 0, vl_baTrama.Length); var endPoint = new IPEndPoint(IPAddress.Parse(vl_sDetalleConexion[0]), int.Parse(vl_sDetalleConexion[1])); var vl_tcpSocket = new TcpClient(); vl_tcpSocket.SendTimeout = int.Parse(vl_sDetalleConexion[2]) * 1000; vl_tcpSocket.ReceiveTimeout = int.Parse(vl_sDetalleConexion[3]) * 1000; vl_dtInicio = DateTime.Now; try { vl_tcpSocket.Connect(endPoint); } catch { MyMaster.AlertaMostrar("No se pudo establecer la conexión."); return; } System.IO.Stream nsEscritura = vl_tcpSocket.GetStream(); nsEscritura.Write(vl_baTrama, 0, vl_baTrama.Length); try { m_iBytes = nsEscritura.Read(m_aBuffer, 0, m_aBuffer.Length); newArray = new byte[m_iBytes]; Array.Copy(m_aBuffer, 0, newArray, 0, m_iBytes); //Buffer.BlockCopy(m_aBuffer, 16, newArray, 0, m_iBytes); } catch { MyMaster.AlertaMostrar("Se agotó el tiempo de espera para la recepción del mensaje."); vl_tcpSocket.Close(); return; } vl_tcpSocket.Close(); vl_dtFin = DateTime.Now; this.tbTrama.Text = vl_isoTrama.generarMensaje(); this.tlEnvio.Visible = true; vl_isoTrama = new ISO8583.Iso8583(newArray); this.tbTramaRespuesta.Text = System.Text.Encoding.ASCII.GetString(newArray); this.lbTiempoRespuesta.Text = (vl_dtFin - vl_dtInicio).TotalSeconds.ToString(); this.tlRespuesta.Visible = true; }
protected System.Web.UI.Control CharCreateControls(IPage Source) { System.Web.UI.WebControls.Panel p = new System.Web.UI.WebControls.Panel(); p.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center; /* Name */ System.Web.UI.WebControls.TextBox NameBox = new System.Web.UI.WebControls.TextBox() { ID = "Avatar_Name", Text = "Faerina", BorderStyle = System.Web.UI.WebControls.BorderStyle.None, Width = System.Web.UI.WebControls.Unit.Percentage(100) }; NameBox.Font.Size = System.Web.UI.WebControls.FontUnit.Larger; p.Controls.Add(NameBox); List <string> AvatarParts = new List <string>() { "skin", "wings", "hair", "pants", "shirt", "shoes" }; System.Web.UI.WebControls.Panel combined = new System.Web.UI.WebControls.Panel() { CssClass = "OverlapContainer", Width = System.Web.UI.WebControls.Unit.Pixel(262), Height = System.Web.UI.WebControls.Unit.Pixel(332), }; foreach (string part in AvatarParts) { combined.Controls.Add(new System.Web.UI.WebControls.Image() { ImageUrl = "Images/Avatar/char_" + part + ".png", CssClass = "OverlapImage img_" + part }); } System.Web.UI.WebControls.Panel scom = new System.Web.UI.WebControls.Panel() { HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center }; scom.Controls.Add(combined); p.Controls.Add(scom); Dictionary <string, int> BaseColor = new Dictionary <string, int> { { "skin", 195 }, { "wings", 193 }, { "hair", 61 }, { "pants", 82 }, { "shirt", 154 }, { "shoes", 45 } }; Dictionary <string, double> PartBrightBase = new Dictionary <string, double> { { "skin", .3 }, { "wings", .3 }, { "hair", .2 }, { "pants", .4 }, { "shirt", .3 }, { "shoes", .2 } }; Dictionary <string, double> PartBright = new Dictionary <string, double> { { "skin", .2 }, { "wings", .2 }, { "hair", .5 }, { "pants", .4 }, { "shirt", .2 }, { "shoes", .5 } }; foreach (string part in AvatarParts) { //inline block System.Web.UI.WebControls.Panel icom = new System.Web.UI.WebControls.Panel() { CssClass = "TileImage" }; System.Web.UI.HtmlControls.HtmlTable Tabular = new System.Web.UI.HtmlControls.HtmlTable(); int HueCount = 5; int BrightCount = 5; int HueSpacing = 360 / HueCount; int HueBase = 45; if (part == "skin") { HueBase = -HueBase; } for (int row_idx = 0; row_idx < HueCount + 1; ++row_idx) { System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow(); if (row_idx < HueCount) { //Hue row.Cells.Add(new System.Web.UI.HtmlControls.HtmlTableCell() { Controls = { Stylize(new System.Web.UI.WebControls.Button() { UseSubmitBehavior = false, Text = " ", BorderStyle = System.Web.UI.WebControls.BorderStyle.None, OnClientClick = "changeHue('" + part + "'," + ((HueSpacing * (row_idx - 2)) + HueBase) + ");//", BackColor = System.Drawing.Color.FromArgb( BaseColor[part], BaseColor[part], BaseColor[part] ) }, "filter_brightness_" + part, "sepia(1)" + " hue-rotate(" + ((HueSpacing * (row_idx - 2)) + HueBase) + "deg)" ) } }); if (row_idx == 0) { System.Web.UI.HtmlControls.HtmlInputHidden partHue = new System.Web.UI.HtmlControls.HtmlInputHidden() { ID = "val_h_" + part, Value = HueBase.ToString(), ViewStateMode = System.Web.UI.ViewStateMode.Disabled }; System.Web.UI.HtmlControls.HtmlInputHidden partBri = new System.Web.UI.HtmlControls.HtmlInputHidden() { ID = "val_b_" + part, Value = (PartBrightBase[part] + PartBright[part] * 2).ToString(), ViewStateMode = System.Web.UI.ViewStateMode.Disabled }; System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image() { ImageUrl = "Images/Avatar/Zoom/char_" + part + ".png", CssClass = "img_" + part }; row.Cells.Add(new System.Web.UI.HtmlControls.HtmlTableCell() { ColSpan = HueCount, RowSpan = BrightCount, Controls = { img, partHue, partBri } }); } } else { row.Cells.Add(new System.Web.UI.HtmlControls.HtmlTableCell()); for (int col_idx = 0; col_idx < BrightCount; ++col_idx) { row.Cells.Add(new System.Web.UI.HtmlControls.HtmlTableCell() { Controls = { Stylize( new System.Web.UI.WebControls.Button() { UseSubmitBehavior = false, Text = " ", BorderStyle = System.Web.UI.WebControls.BorderStyle.None, OnClientClick = "changeBrightness('" + part + "'," + (PartBrightBase[part] + PartBright[part] * col_idx) + ");//", BackColor = System.Drawing.Color.FromArgb( BaseColor[part], BaseColor[part], BaseColor[part] ) }, "filter_hue_" + part, "sepia(1) brightness(" + (PartBrightBase[part] + PartBright[part] * col_idx) + ");" ) } }); } } Tabular.Rows.Add(row); } icom.Controls.Add(Tabular); p.Controls.Add(icom); } return(p); }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { return; } #region " AdRotator " AdRotator1.Height = 100; AdRotator1.Width = 100; AdRotator1.AdvertisementFile = "AdRotatorControlTestData.xml"; AdRotator1.BorderColor = Color.Black; AdRotator1.BorderStyle = BorderStyle.Solid; AdRotator1.BorderWidth = 2; #endregion #region " BulletedList " //todo: for BulletedList, the third part of the triplet appears to be if the item is enabled. Could improve Glimpse visualizer for this. BulletedList1.Items.Add(new ListItem("Item Zero", "A")); BulletedList1.Items.Add(new ListItem("Item One", "B")); BulletedList1.Items.Add(new ListItem("Item Two", "C")); BulletedList1.Items.Add(new ListItem("Item Three (disabled)", "D")); BulletedList1.Items[3].Enabled = false; #endregion #region " Button " Button1.Text = "I am Button1"; Button1.ToolTip = "Button1 Tooltip is here."; Button1.Width = 300; Button1.Height = 80; Button1.BackColor = Color.Red; Button1.ForeColor = Color.Blue; #endregion #region " Calendar " Calendar1.DayNameFormat = DayNameFormat.FirstTwoLetters; Calendar1.FirstDayOfWeek = FirstDayOfWeek.Monday; Calendar1.Caption = "Super calendar!"; #endregion #region " Checkbox " CheckBox1Checked.Checked = true; CheckBox1Checked.Text = "This is a checked Checkbox."; CheckBox2UnChecked.Checked = false; CheckBox2UnChecked.Text = "This is an unchecked Checkbox."; #endregion #region " CheckboxList " CheckBoxList1.Items.Add(new ListItem("Item Zero (default)", "A")); CheckBoxList1.Items.Add(new ListItem("Item One (selected)", "B")); CheckBoxList1.Items.Add(new ListItem("Item Two (not selected)", "C")); CheckBoxList1.Items.Add(new ListItem("Item Three (disabled)", "D")); CheckBoxList1.Items[1].Selected = true; CheckBoxList1.Items[2].Selected = false; CheckBoxList1.Items[3].Enabled = false; #endregion #region " DropDownList " DropDownList1.Items.Add(new ListItem("Item Zero (default)", "A")); DropDownList1.Items.Add(new ListItem("Item One (selected)", "B")); DropDownList1.Items.Add(new ListItem("Item Two (not selected)", "C")); DropDownList1.Items.Add(new ListItem("Item Three (disabled)", "D")); DropDownList1.Items[1].Selected = true; DropDownList1.Items[2].Selected = false; DropDownList1.Items[3].Enabled = false; #endregion #region " FileUpload " FileUpload1.AllowMultiple = true; FileUpload1.Height = 80; FileUpload1.Width = 300; FileUpload1.ToolTip = "this is a file uploader"; #endregion #region " HiddenField " HiddenField1.Value = "this is a hidden field."; #endregion #region " Hyperlink " HyperLink1.ForeColor = Color.Gray; HyperLink1.NavigateUrl = "https://github.com/Glimpse/Glimpse"; HyperLink1.Text = "Go to Glimpse project site!"; #endregion #region " Image " Image1.ImageUrl = "/Images/logo.jpg"; Image1.AlternateText = "This is a logo"; Image1.DescriptionUrl = "this is the description URL... whatever that is."; #endregion #region " ImageButton " ImageButton1.ImageUrl = "/Images/logo.jpg"; ImageButton1.AlternateText = "This is a logo (ImageButton)"; ImageButton1.DescriptionUrl = "this is the description URL... whatever that is. (ImageButton)"; ImageButton1.PostBackUrl = "PopulatedControls.aspx?ImageButtonPostBack=1"; #endregion #region " ImageMap " ImageMap1.ImageUrl = "/Images/logo.jpg"; ImageMap1.HotSpotMode = HotSpotMode.PostBack; RectangleHotSpot hotSpot1 = new RectangleHotSpot(); hotSpot1.PostBackValue = "hotSpot 1"; hotSpot1.Top = 0; hotSpot1.Bottom = 101; hotSpot1.Left = 0; hotSpot1.Right = 181; hotSpot1.NavigateUrl = "PopulatedControls.aspx"; ImageMap1.HotSpots.Add(hotSpot1); RectangleHotSpot hotSpot2 = new RectangleHotSpot(); hotSpot2.PostBackValue = "hotSpot 2"; hotSpot2.Top = 0; hotSpot2.Bottom = 101; hotSpot2.Left = 182; hotSpot2.Right = 362; hotSpot2.NavigateUrl = "PopulatedControls.aspx"; ImageMap1.HotSpots.Add(hotSpot2); #endregion #region " Label " Label1.Text = "This is the best label. Ever."; Label1.ForeColor = Color.Orange; Label1.Font.Name = "Comic Sans MS"; Label1.Font.Size = 24; #endregion #region " LinkButton " LinkButton1.PostBackUrl = "PopulatedControls.aspx?LinkButton1Postback=1"; LinkButton1.Text = "This is a link button"; LinkButton1.Font.Italic = true; #endregion #region " ListBox " ListBox1.Items.Add(new ListItem("Item Zero (default)", "A")); ListBox1.Items.Add(new ListItem("Item One (selected)", "B")); ListBox1.Items.Add(new ListItem("Item Two (not selected)", "C")); ListBox1.Items.Add(new ListItem("Item Three (disabled)", "D")); ListBox1.Items[1].Selected = true; ListBox1.Items[2].Selected = false; ListBox1.Items[3].Enabled = false; ListBox1.BorderColor = Color.Blue; ListBox1.BorderStyle = BorderStyle.Dashed; ListBox1.BorderWidth = 3; #endregion #region " Literal " Literal1.Text = "<b>This is some literal content</b><pre>OH YEAH!!!" + Environment.NewLine + "This is on the next line.</pre>"; #endregion #region " Localize " Localize1.Mode = LiteralMode.Encode; #endregion #region " MultiView " //todo: The MultiView and View controls don't seem to have any sort of visibility into their data. MultiView1.ActiveViewIndex = 1; #endregion #region " Panel " Panel1.Width = 400; Panel1.Height = 200; Panel1.BorderColor = Color.Green; Panel1.BorderWidth = 5; Panel1.BorderStyle = BorderStyle.Inset; var panel1TextBox1 = new TextBox(); panel1TextBox1.ID = "panel1TextBox1"; panel1TextBox1.Text = "This is the panel1TextBox1 text value."; panel1TextBox1.Width = 300; Panel1.Controls.Add(panel1TextBox1); #endregion #region " PlaceHolder " var placeHolder1TextBox1 = new TextBox(); placeHolder1TextBox1.ID = "placeHolder1TextBox1"; placeHolder1TextBox1.Text = "This is the placeHolder1TextBox1 text value."; placeHolder1TextBox1.Width = 500; PlaceHolder1.Controls.Add(placeHolder1TextBox1); #endregion #region " RadioButton " RadioButton1.Checked = true; RadioButton2.Checked = false; RadioButton1.Text = "This is RadioButton1! The initial value is checked."; RadioButton2.Text = "This is RadioButton2! The initial value is not checked."; RadioButton3.Text = "This is RadioButton3! The initial value is not specified."; #endregion #region " RadioButtonList " RadioButtonList1.Items.Add(new ListItem("Item Zero (default)", "A")); RadioButtonList1.Items.Add(new ListItem("Item One (selected)", "B")); RadioButtonList1.Items.Add(new ListItem("Item Two (not selected)", "C")); RadioButtonList1.Items.Add(new ListItem("Item Three (disabled)", "D")); RadioButtonList1.Items[1].Selected = true; RadioButtonList1.Items[2].Selected = false; RadioButtonList1.Items[3].Enabled = false; RadioButtonList1.BorderColor = Color.Gray; RadioButtonList1.BorderStyle = BorderStyle.Outset; RadioButtonList1.BorderWidth = 2; #endregion #region " Substitution " Substitution1.Visible = true; #endregion #region " Table " Table1.Rows.Add(TableHeaderRowFromStringArray(new string[] { "Column 1 Header", "Column 2 Header", "Column 3 Header" })); Table1.Rows.Add(TableRowFromStringArray(new string[] { "Field1 A", "Field2", "Field3" })); Table1.Rows.Add(TableRowFromStringArray(new string[] { "Field1 B", "Field2", "Field3" })); Table1.Rows.Add(TableRowFromStringArray(new string[] { "Field1 C", "Field2", "Field3" })); #endregion #region " Textbox " TextBox1.Text = "This is a text box control."; TextBox1.ReadOnly = true; #endregion #region " View " var View1Label = new Label(); View1Label.Text = "This is the label inside the view... I am invisible because my parent View is supposed to be in a MultiView."; View1Label.Width = 100; View1.Controls.Add(View1Label); #endregion #region " Wizard " Wizard1.BackColor = Color.Honeydew; WizardStep1.AllowReturn = true; WizardStep2.AllowReturn = true; var WizardStep1TextBox1 = new TextBox(); WizardStep1TextBox1.Text = "This is Wizard step 0 checkbox 1."; WizardStep1.Controls.Add(WizardStep1TextBox1); var WizardStep2TextBox1 = new TextBox(); WizardStep2TextBox1.Text = "This is Wizard step 1 checkbox 1."; WizardStep2.Controls.Add(WizardStep2TextBox1); Wizard1.ActiveStepIndex = 0; #endregion #region " Xml " //todo: need to create an XSLT or else this will crash BrowserLink in VS2013. #endregion #region " HtmlButton " HtmlButton1.Value = "I am Html Button1"; #endregion #region " HtmlReset " HtmlReset1.Value = "I am Html Reset1"; #endregion #region " HtmlSubmit " HtmlSubmit1.Value = "I am Html Submit1"; #endregion #region " HtmlText " HtmlText1.Value = "I am Html Text1"; HtmlText1.Size = 100; #endregion #region " Html Input File " HtmlFile1.Accept = "text/xml"; #endregion #region " HtmlPassword " HtmlPassword1.Size = 200; HtmlPassword1.Value = "MyVoiceIsMyPassportVerifyMe"; #endregion #region " Html Input Checkbox " HtmlCheckbox1.Checked = true; HtmlCheckbox1.Name = "HtmlCheckbox1Name"; #endregion #region " Html Input Radio " HtmlRadio1.Checked = true; HtmlRadio1.Name = "HtmlRadio1Name"; #endregion #region " Html Input Hidden " HtmlHidden1.Value = "This is so hidden right now..."; HtmlHidden1.Name = "HtmlHidden1Name"; #endregion #region " Html Textarea " HtmlTextArea1.Value = "This is some multiline text.\nThis is line 2."; HtmlTextArea1.Name = "HtmlTextArea1Name"; #endregion #region " Html Table " var htmlTableRow1 = new System.Web.UI.HtmlControls.HtmlTableRow(); var htmlTableRow1Cell1 = new System.Web.UI.HtmlControls.HtmlTableCell(); htmlTableRow1Cell1.InnerText = "Cell1"; htmlTableRow1Cell1.BgColor = "green"; var htmlTableRow1Cell2 = new System.Web.UI.HtmlControls.HtmlTableCell(); htmlTableRow1Cell2.InnerText = "Cell2"; htmlTableRow1Cell2.BgColor = "pink"; htmlTableRow1.Cells.Add(htmlTableRow1Cell1); htmlTableRow1.Cells.Add(htmlTableRow1Cell2); HtmlTable.Rows.Add(htmlTableRow1); HtmlTable.Border = 1; HtmlTable.BorderColor = "gray"; #endregion #region " Html Image " HtmlImage1.Src = "~/Images/orderedList0.png"; HtmlImage1.Alt = "This is a zero picture. Sweet!"; #endregion #region " Html Select " HtmlSelect1.Items.Add(new ListItem("Item Zero (default)", "A")); HtmlSelect1.Items.Add(new ListItem("Item One (selected)", "B")); HtmlSelect1.Items.Add(new ListItem("Item Two (not selected)", "C")); HtmlSelect1.Items.Add(new ListItem("Item Three (disabled)", "D")); HtmlSelect1.Items[1].Selected = true; HtmlSelect1.Items[2].Selected = false; HtmlSelect1.Items[3].Enabled = false; #endregion #region " Html Horizontal Rule " horizontalRule1.InnerText = "Server side Horizontal Rules are the wave of the future."; horizontalRule1.Style.Add(HtmlTextWriterStyle.Color, "red"); horizontalRule1.EnableViewState = true; #endregion #region " Html Div " HtmlDiv1.InnerText = "This is some text inside this server-side div."; HtmlDiv1.EnableViewState = true; #endregion #region " Chart " Chart1.Series["Series1"].Points.DataBindY(PopulatedControls.GetSmallSampleNumericData()); Chart1.BackColor = Color.BlanchedAlmond; System.Diagnostics.Debug.Print(Chart1.ViewStateMode.ToString()); #endregion }
private void LinkControls(ControlCollection ctrls) { foreach (Control ctrl in ctrls) { switch (ctrl.ID) { case "tgQR": tgQR = (Toggle)ctrl; tgQR.ImagePath = ThemePath; break; case "tgdQR": tgdQR = (ToggleDisplay)ctrl; break; case "plhMessage": plhMessage = (PlaceHolder)ctrl; break; case "reqUserName": reqUserName = (System.Web.UI.WebControls.RequiredFieldValidator)ctrl; break; case "txtUserName": txtUserName = (System.Web.UI.HtmlControls.HtmlInputText)ctrl; break; case "reqBody": reqBody = (Label)ctrl; break; case "reqSecurityCode": reqSecurityCode = (Label)ctrl; break; case "chkSubscribe": chkSubscribe = (CheckBox)ctrl; break; case "ambtnSubmit": ambtnSubmit = (ImageButton)ctrl; break; case "btnSubmit": btnSubmit = (System.Web.UI.HtmlControls.HtmlInputButton)ctrl; break; case "trUsername": trUsername = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl; break; case "trCaptcha": trCaptcha = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl; break; case "trSubscribe": trSubscribe = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl; break; } if (ctrl is Controls.ControlsBase) { ((Controls.ControlsBase)ctrl).ControlConfig = this.ControlConfig; } if (ctrl.Controls.Count > 0) { LinkControls(ctrl.Controls); } } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { return; } #region " AdRotator " AdRotator1.Height = 100; AdRotator1.Width = 100; AdRotator1.AdvertisementFile = "AdRotatorControlTestData.xml"; AdRotator1.BorderColor = Color.Black; AdRotator1.BorderStyle = BorderStyle.Solid; AdRotator1.BorderWidth = 2; #endregion #region " BulletedList " //todo: for BulletedList, the third part of the triplet appears to be if the item is enabled. Could improve Glimpse visualizer for this. BulletedList1.Items.Add(new ListItem("Item Zero", "A")); BulletedList1.Items.Add(new ListItem("Item One", "B")); BulletedList1.Items.Add(new ListItem("Item Two", "C")); BulletedList1.Items.Add(new ListItem("Item Three (disabled)", "D")); BulletedList1.Items[3].Enabled = false; #endregion #region " Button " Button1.Text = "I am Button1"; Button1.ToolTip = "Button1 Tooltip is here."; Button1.Width = 300; Button1.Height = 80; Button1.BackColor = Color.Red; Button1.ForeColor = Color.Blue; #endregion #region " Calendar " Calendar1.DayNameFormat = DayNameFormat.FirstTwoLetters; Calendar1.FirstDayOfWeek = FirstDayOfWeek.Monday; Calendar1.Caption = "Super calendar!"; #endregion #region " Checkbox " CheckBox1Checked.Checked = true; CheckBox1Checked.Text = "This is a checked Checkbox."; CheckBox2UnChecked.Checked = false; CheckBox2UnChecked.Text = "This is an unchecked Checkbox."; #endregion #region " CheckboxList " CheckBoxList1.Items.Add(new ListItem("Item Zero (default)", "A")); CheckBoxList1.Items.Add(new ListItem("Item One (selected)", "B")); CheckBoxList1.Items.Add(new ListItem("Item Two (not selected)", "C")); CheckBoxList1.Items.Add(new ListItem("Item Three (disabled)", "D")); CheckBoxList1.Items[1].Selected = true; CheckBoxList1.Items[2].Selected = false; CheckBoxList1.Items[3].Enabled = false; #endregion #region " DropDownList " DropDownList1.Items.Add(new ListItem("Item Zero (default)", "A")); DropDownList1.Items.Add(new ListItem("Item One (selected)", "B")); DropDownList1.Items.Add(new ListItem("Item Two (not selected)", "C")); DropDownList1.Items.Add(new ListItem("Item Three (disabled)", "D")); DropDownList1.Items[1].Selected = true; DropDownList1.Items[2].Selected = false; DropDownList1.Items[3].Enabled = false; #endregion #region " FileUpload " FileUpload1.AllowMultiple = true; FileUpload1.Height = 80; FileUpload1.Width = 300; FileUpload1.ToolTip = "this is a file uploader"; #endregion #region " HiddenField " HiddenField1.Value = "this is a hidden field."; #endregion #region " Hyperlink " HyperLink1.ForeColor = Color.Gray; HyperLink1.NavigateUrl = "https://github.com/Glimpse/Glimpse"; HyperLink1.Text = "Go to Glimpse project site!"; #endregion #region " Image " Image1.ImageUrl = "/Images/logo.jpg"; Image1.AlternateText = "This is a logo"; Image1.DescriptionUrl = "this is the description URL... whatever that is."; #endregion #region " ImageButton " ImageButton1.ImageUrl = "/Images/logo.jpg"; ImageButton1.AlternateText = "This is a logo (ImageButton)"; ImageButton1.DescriptionUrl = "this is the description URL... whatever that is. (ImageButton)"; ImageButton1.PostBackUrl = "PopulatedControls.aspx?ImageButtonPostBack=1"; #endregion #region " ImageMap " ImageMap1.ImageUrl = "/Images/logo.jpg"; ImageMap1.HotSpotMode = HotSpotMode.PostBack; RectangleHotSpot hotSpot1 = new RectangleHotSpot(); hotSpot1.PostBackValue = "hotSpot 1"; hotSpot1.Top = 0; hotSpot1.Bottom = 101; hotSpot1.Left = 0; hotSpot1.Right = 181; hotSpot1.NavigateUrl = "PopulatedControls.aspx"; ImageMap1.HotSpots.Add(hotSpot1); RectangleHotSpot hotSpot2 = new RectangleHotSpot(); hotSpot2.PostBackValue = "hotSpot 2"; hotSpot2.Top = 0; hotSpot2.Bottom = 101; hotSpot2.Left = 182; hotSpot2.Right = 362; hotSpot2.NavigateUrl = "PopulatedControls.aspx"; ImageMap1.HotSpots.Add(hotSpot2); #endregion #region " Label " Label1.Text = "This is the best label. Ever."; Label1.ForeColor = Color.Orange; Label1.Font.Name = "Comic Sans MS"; Label1.Font.Size = 24; #endregion #region " LinkButton " LinkButton1.PostBackUrl = "PopulatedControls.aspx?LinkButton1Postback=1"; LinkButton1.Text = "This is a link button"; LinkButton1.Font.Italic = true; #endregion #region " ListBox " ListBox1.Items.Add(new ListItem("Item Zero (default)", "A")); ListBox1.Items.Add(new ListItem("Item One (selected)", "B")); ListBox1.Items.Add(new ListItem("Item Two (not selected)", "C")); ListBox1.Items.Add(new ListItem("Item Three (disabled)", "D")); ListBox1.Items[1].Selected = true; ListBox1.Items[2].Selected = false; ListBox1.Items[3].Enabled = false; ListBox1.BorderColor = Color.Blue; ListBox1.BorderStyle = BorderStyle.Dashed; ListBox1.BorderWidth = 3; #endregion #region " Literal " Literal1.Text = "<b>This is some literal content</b><pre>OH YEAH!!!" + Environment.NewLine + "This is on the next line.</pre>"; #endregion #region " Localize " Localize1.Mode = LiteralMode.Encode; #endregion #region " MultiView " //todo: The MultiView and View controls don't seem to have any sort of visibility into their data. MultiView1.ActiveViewIndex = 1; #endregion #region " Panel " Panel1.Width = 400; Panel1.Height = 200; Panel1.BorderColor = Color.Green; Panel1.BorderWidth = 5; Panel1.BorderStyle = BorderStyle.Inset; var panel1TextBox1 = new TextBox(); panel1TextBox1.ID = "panel1TextBox1"; panel1TextBox1.Text = "This is the panel1TextBox1 text value."; panel1TextBox1.Width = 300; Panel1.Controls.Add(panel1TextBox1); #endregion #region " PlaceHolder " var placeHolder1TextBox1 = new TextBox(); placeHolder1TextBox1.ID = "placeHolder1TextBox1"; placeHolder1TextBox1.Text = "This is the placeHolder1TextBox1 text value."; placeHolder1TextBox1.Width = 500; PlaceHolder1.Controls.Add(placeHolder1TextBox1); #endregion #region " RadioButton " RadioButton1.Checked = true; RadioButton2.Checked = false; RadioButton1.Text = "This is RadioButton1! The initial value is checked."; RadioButton2.Text = "This is RadioButton2! The initial value is not checked."; RadioButton3.Text = "This is RadioButton3! The initial value is not specified."; #endregion #region " RadioButtonList " RadioButtonList1.Items.Add(new ListItem("Item Zero (default)", "A")); RadioButtonList1.Items.Add(new ListItem("Item One (selected)", "B")); RadioButtonList1.Items.Add(new ListItem("Item Two (not selected)", "C")); RadioButtonList1.Items.Add(new ListItem("Item Three (disabled)", "D")); RadioButtonList1.Items[1].Selected = true; RadioButtonList1.Items[2].Selected = false; RadioButtonList1.Items[3].Enabled = false; RadioButtonList1.BorderColor = Color.Gray; RadioButtonList1.BorderStyle = BorderStyle.Outset; RadioButtonList1.BorderWidth = 2; #endregion #region " Substitution " Substitution1.Visible = true; #endregion #region " Table " Table1.Rows.Add(TableHeaderRowFromStringArray(new string[] { "Column 1 Header", "Column 2 Header", "Column 3 Header" })); Table1.Rows.Add(TableRowFromStringArray(new string[] { "Field1 A", "Field2", "Field3" })); Table1.Rows.Add(TableRowFromStringArray(new string[] { "Field1 B", "Field2", "Field3" })); Table1.Rows.Add(TableRowFromStringArray(new string[] { "Field1 C", "Field2", "Field3" })); #endregion #region " Textbox " TextBox1.Text = "This is a text box control."; TextBox1.ReadOnly = true; #endregion #region " View " var View1Label = new Label(); View1Label.Text = "This is the label inside the view... I am invisible because my parent View is supposed to be in a MultiView."; View1Label.Width = 100; View1.Controls.Add(View1Label); #endregion #region " Wizard " Wizard1.BackColor = Color.Honeydew; WizardStep1.AllowReturn = true; WizardStep2.AllowReturn = true; var WizardStep1TextBox1 = new TextBox(); WizardStep1TextBox1.Text = "This is Wizard step 0 checkbox 1."; WizardStep1.Controls.Add(WizardStep1TextBox1); var WizardStep2TextBox1 = new TextBox(); WizardStep2TextBox1.Text = "This is Wizard step 1 checkbox 1."; WizardStep2.Controls.Add(WizardStep2TextBox1); Wizard1.ActiveStepIndex = 0; #endregion #region " Xml " //todo: need to create an XSLT or else this will crash BrowserLink in VS2013. #endregion #region " HtmlButton " HtmlButton1.Value = "I am Html Button1"; #endregion #region " HtmlReset " HtmlReset1.Value = "I am Html Reset1"; #endregion #region " HtmlSubmit " HtmlSubmit1.Value = "I am Html Submit1"; #endregion #region " HtmlText " HtmlText1.Value = "I am Html Text1"; HtmlText1.Size = 100; #endregion #region " Html Input File " HtmlFile1.Accept = "text/xml"; #endregion #region " HtmlPassword " HtmlPassword1.Size = 200; HtmlPassword1.Value = "MyVoiceIsMyPassportVerifyMe"; #endregion #region " Html Input Checkbox " HtmlCheckbox1.Checked = true; HtmlCheckbox1.Name = "HtmlCheckbox1Name"; #endregion #region " Html Input Radio " HtmlRadio1.Checked = true; HtmlRadio1.Name = "HtmlRadio1Name"; #endregion #region " Html Input Hidden " HtmlHidden1.Value = "This is so hidden right now..."; HtmlHidden1.Name = "HtmlHidden1Name"; #endregion #region " Html Textarea " HtmlTextArea1.Value = "This is some multiline text.\nThis is line 2."; HtmlTextArea1.Name = "HtmlTextArea1Name"; #endregion #region " Html Table " var htmlTableRow1 = new System.Web.UI.HtmlControls.HtmlTableRow(); var htmlTableRow1Cell1 = new System.Web.UI.HtmlControls.HtmlTableCell(); htmlTableRow1Cell1.InnerText = "Cell1"; htmlTableRow1Cell1.BgColor = "green"; var htmlTableRow1Cell2 = new System.Web.UI.HtmlControls.HtmlTableCell(); htmlTableRow1Cell2.InnerText = "Cell2"; htmlTableRow1Cell2.BgColor = "pink"; htmlTableRow1.Cells.Add(htmlTableRow1Cell1); htmlTableRow1.Cells.Add(htmlTableRow1Cell2); HtmlTable.Rows.Add(htmlTableRow1); HtmlTable.Border = 1; HtmlTable.BorderColor = "gray"; #endregion #region " Html Image " HtmlImage1.Src = "~/Images/orderedList0.png"; HtmlImage1.Alt = "This is a zero picture. Sweet!"; #endregion #region " Html Select " HtmlSelect1.Items.Add(new ListItem("Item Zero (default)", "A")); HtmlSelect1.Items.Add(new ListItem("Item One (selected)", "B")); HtmlSelect1.Items.Add(new ListItem("Item Two (not selected)", "C")); HtmlSelect1.Items.Add(new ListItem("Item Three (disabled)", "D")); HtmlSelect1.Items[1].Selected = true; HtmlSelect1.Items[2].Selected = false; HtmlSelect1.Items[3].Enabled = false; #endregion #region " Html Horizontal Rule " horizontalRule1.InnerText = "Server side Horizontal Rules are the wave of the future."; horizontalRule1.Style.Add(HtmlTextWriterStyle.Color, "red"); horizontalRule1.EnableViewState = true; #endregion #region " Html Div " HtmlDiv1.InnerText = "This is some text inside this server-side div."; HtmlDiv1.EnableViewState = true; #endregion #region " Chart " Chart1.Series["Series1"].Points.DataBindY(PopulatedControls.GetSmallSampleNumericData()); Chart1.BackColor = Color.BlanchedAlmond; System.Diagnostics.Debug.Print(Chart1.ViewStateMode.ToString()); #endregion }