本文整理汇总了C#中System.Web.UI.HtmlControls.HtmlTableCell类的典型用法代码示例。如果您正苦于以下问题:C# HtmlTableCell类的具体用法?C# HtmlTableCell怎么用?C# HtmlTableCell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HtmlTableCell类属于System.Web.UI.HtmlControls命名空间,在下文中一共展示了HtmlTableCell类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HtmlTable table1 = new HtmlTable();
table1.Border = 1;
table1.CellPadding = 3;
table1.CellSpacing = 3;
table1.BorderColor = "red";
HtmlTableRow row;
HtmlTableCell cell;
for (int i = 1; i <= 5; i++)
{
row = new HtmlTableRow();
row.BgColor = (i % 2 == 0 ? "lightyellow" : "lightcyan");
for (int j = 1; j <= 4; j++)
{
cell = new HtmlTableCell();
cell.InnerHtml = "Row: " + i.ToString() + "<br /> Cell: " + j.ToString();
row.Cells.Add(cell);
}
table1.Rows.Add(row);
}
this.Controls.Add(table1);
}
开发者ID:bq-wang,项目名称:aspnet,代码行数:30,代码来源:WebForm_CreateServerControls.aspx.cs
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
//tabelaZlecenia.Rows.Clear();
DataView view = (DataView)SqlDataZleceniodawcy.Select(DataSourceSelectArguments.Empty);
DataTable table = view.ToTable();
DataSet ds = new DataSet();
ds.Tables.Add(table);
foreach (DataRow row in ds.Tables[0].Rows)
{
HtmlTableRow htmlrow = new HtmlTableRow();
HtmlTableCell htmlcell = new HtmlTableCell();
HtmlTableCell htmlcell2 = new HtmlTableCell();
HtmlTableCell htmlcell3 = new HtmlTableCell();
HtmlTableCell htmlcell4 = new HtmlTableCell();
HtmlTableCell htmlcell5 = new HtmlTableCell();
htmlcell.InnerText = row["Imie"].ToString() + " " + row["Nazwisko"].ToString();
htmlrow.Cells.Add(htmlcell);
htmlcell2.InnerText = row["NazwaFirmy"].ToString();
htmlrow.Cells.Add(htmlcell2);
htmlcell3.InnerText = row["email"].ToString();
htmlrow.Cells.Add(htmlcell3);
htmlcell4.InnerText = row["Telefon"].ToString();
htmlrow.Cells.Add(htmlcell4);
htmlcell5.InnerText = row["NIP"].ToString();
htmlrow.Cells.Add(htmlcell5);
tabelaZleceniodawcy.Rows.Add(htmlrow);
tabelaZleceniodawcy.DataBind();
}
}
开发者ID:jAANUSZEK0700,项目名称:topdruk24-produkcja,代码行数:29,代码来源:Default.aspx.cs
示例3: Test
private void Test()
{
string _discountName = "asdfghij";
//row.Where(r => r.Cells.Any(c => c.InnerText.Contains(discountName)));
List<HtmlTableRow> _discountTable = new List<HtmlTableRow>();
for (int _row = 0; _row < 2; _row++)
{
HtmlTableRow _newRow = new HtmlTableRow();
for (int _cells = 0; _cells < 5; _cells++)
{
HtmlTableCell _cell = new HtmlTableCell();
_cell.InnerText = "Cell" + _cells.ToString();
_newRow.Cells.Add(_cell);
}
_discountTable.Add(_newRow);
}
List<HtmlTableRow> _resultRows = new List<HtmlTableRow>();
foreach (HtmlTableRow _htmlTableRow in _discountTable)
{
if (_htmlTableRow.Cells.Cast<HtmlTableCell>().Any(_cell => _cell.InnerText.Contains(_discountName)))
{
_resultRows.Add(_htmlTableRow);
}
}
}
开发者ID:ighristov,项目名称:totocheck2,代码行数:26,代码来源:Service1.cs
示例4: AddCell
private HtmlTableCell AddCell(HtmlTableRow row, string text)
{
var cell = new HtmlTableCell();
cell.InnerHtml = text;
row.Cells.Add(cell);
return cell;
}
开发者ID:fathurxzz,项目名称:aleqx,代码行数:7,代码来源:CompareProducts.ascx.cs
示例5: LoadUDFs
public void LoadUDFs()
{
var udfList = UDF.GetUDFList(_udfLevel, _levelID);
if (udfList.Count > 0)
{
var udfTable = new HtmlTable();
udfTable.Attributes["class"] = "fieldValueTable";
udfTable.Width = "100%";
foreach (UDF udf in udfList)
{
var tableRow = new HtmlTableRow();
var labelCell = new HtmlTableCell();
var valueCell = new HtmlTableCell();
labelCell.Attributes["class"] = "fieldLabel";
labelCell.InnerHtml = udf.Name + ":";
valueCell.InnerHtml = udf.Value;
tableRow.Cells.Add(labelCell);
tableRow.Cells.Add(valueCell);
udfTable.Rows.Add(tableRow);
udfInformationContainer.Controls.Add(udfTable);
udfTable.DataBind();
}
}
}
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:31,代码来源:UDFInformation.ascx.cs
示例6: RefreshCheckpointList
private void RefreshCheckpointList()
{
CheckpointsTable.Rows.Clear();
HtmlTableRow tr = new HtmlTableRow();
foreach (JobCheckpoint cp in checkpoints)
{
HtmlTableCell value = new HtmlTableCell();
value.InnerText = cp.Name;
switch (cp.ExecutionStatus)
{
case JobExecutionState.Unknown:
case JobExecutionState.Scheduled:
value.Attributes.Add("class", "Checkpoint");
break;
default:
value.Attributes.Add("class", "Checkpoint Checkpoint" + cp.ExecutionStatus.ToString());
break;
}
tr.Cells.Add(value);
}
CheckpointsTable.Rows.Add(tr);
}
开发者ID:horvatferi,项目名称:graywulf,代码行数:27,代码来源:CheckpointProgress.ascx.cs
示例7: btnLiteralTable_Click
protected void btnLiteralTable_Click(object sender, EventArgs e)
{
System.Web.UI.HtmlControls.HtmlTable tableT = new System.Web.UI.HtmlControls.HtmlTable();
System.Web.UI.HtmlControls.HtmlTableRow rowR = new System.Web.UI.HtmlControls.HtmlTableRow();
System.Web.UI.HtmlControls.HtmlTableCell cellA = new System.Web.UI.HtmlControls.HtmlTableCell();
System.Web.UI.HtmlControls.HtmlTableCell cellB = new System.Web.UI.HtmlControls.HtmlTableCell();
System.Web.UI.HtmlControls.HtmlTableCell cellC = new System.Web.UI.HtmlControls.HtmlTableCell();
cellA.InnerText = "t2 C1Header";
cellB.InnerText = "t2 C2Header";
cellC.InnerText = "t2 C3Header";
rowR.Cells.Add(cellA);
rowR.Cells.Add(cellB);
rowR.Cells.Add(cellC);
tableT.Rows.Add(rowR);
cellA = new HtmlTableCell();
cellB = new HtmlTableCell();
cellC = new HtmlTableCell();
rowR = new HtmlTableRow();
cellA.InnerText = "r1c1";
cellB.InnerHtml = "r2c2";
cellC.InnerText = "r3c3";
rowR.Cells.Add(cellA);
rowR.Cells.Add(cellB);
rowR.Cells.Add(cellC);
tableT.Rows.Add(rowR);
this.Controls.Add(tableT);
}
开发者ID:Treasureman1,项目名称:PersonManager,代码行数:29,代码来源:WebForm3.aspx.cs
示例8: LoadWeights
private void LoadWeights()
{
ConnectorDataContext db = new ConnectorDataContext();
Stopwatch w = Stopwatch.StartNew();
List<FeatureScore> fScores = db.FeatureScores.ToList();
w.Stop();
ILog log = LogManager.GetLogger("QueryLogger");
log.Info(" Elapsed time: " + w.Elapsed + ", select all feature scores");
foreach (var item in fScores)
{
HtmlTableCell service = new HtmlTableCell();
HtmlTableCell feature = new HtmlTableCell();
HtmlTableCell weight = new HtmlTableCell();
service.InnerText = item.ServiceInstance.name;
feature.InnerText = item.feature;
weight.InnerText = item.score.ToString();
weight.Attributes.Add("class", "center");
weight.Attributes.Add("contenteditable", "true");
HtmlTableRow tr = new HtmlTableRow();
tr.Cells.Add(service);
tr.Cells.Add(feature);
tr.Cells.Add(weight);
WeightTable.Rows.Add(tr);
}
}
开发者ID:CosimoLovascio,项目名称:SocialCDE-ProxyServer-VSclient,代码行数:30,代码来源:Weights.aspx.cs
示例9: BindUserGorupMaxspacephotosize
private void BindUserGorupMaxspacephotosize()
{
#region 绑定用户组照片空间大小
DataTable dt = DatabaseProvider.GetInstance().GetUserGroupMaxspacephotosize();
int i = 1;
HtmlTableRow tr = new HtmlTableRow();
foreach (DataRow dr in dt.Rows)
{
if (i % 2 == 1)
{
tr = new HtmlTableRow();
}
HtmlTableCell td = new HtmlTableCell("td");
td.Controls.Add(new LiteralControl(dr["grouptitle"].ToString()));
tr.Cells.Add(td);
td = new HtmlTableCell("td");
Discuz.Control.TextBox tb = new Discuz.Control.TextBox();
tb.ID = "maxspacephotosize" + dr["groupid"].ToString();
tb.Size = 10;
tb.MaxLength = 9;
tb.Text = dr["maxspacephotosize"].ToString();
tb.RequiredFieldType = "数据校验";
td.Controls.Add(tb);
tr.Cells.Add(td);
tr.Cells.Add(GetTD("maxspacephotosize" + dr["groupid"].ToString()));
groupphotosize.Rows.Add(tr);
i++;
}
#endregion
}
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:30,代码来源:albumconfig.aspx.cs
示例10: AddTo
public override Control AddTo(Control container)
{
HtmlTableCell labelCell = new HtmlTableCell();
Label label = AddLabel(labelCell);
HtmlTableCell editorCell = new HtmlTableCell();
Control editor = AddEditor(editorCell);
if (label != null && editor != null && !string.IsNullOrEmpty(editor.ID))
label.AssociatedControlID = editor.ID;
HtmlTableCell extraCell = new HtmlTableCell();
if (Required)
AddRequiredFieldValidator(extraCell, editor);
if (Validate)
AddRegularExpressionValidator(extraCell, editor);
AddHelp(extraCell);
HtmlTableRow row = new HtmlTableRow();
row.Cells.Add(labelCell);
row.Cells.Add(editorCell);
row.Cells.Add(extraCell);
HtmlTable editorTable = new HtmlTable();
editorTable.Attributes["class"] = "editDetail";
editorTable.Controls.Add(row);
container.Controls.Add(editorTable);
return editor;
}
开发者ID:spmason,项目名称:n2cms,代码行数:30,代码来源:EditableFreeTextAreaAttribute.cs
示例11: AddControl
private static HtmlTableCell AddControl(JobControl_Get_Result control)
{
HtmlTableCell cell = new HtmlTableCell();
Control c = new Control();
switch (control.ControlTypeName)
{
case "TextBox":
c = new TextBox();
c.ID = control.JobControlID + control.ControlTypeName + control.ControlName;
break;
case "CheckBox":
c = new CheckBox();
c.ID = control.JobControlID + control.ControlTypeName + control.ControlName;
break;
case "ImageUpload":
c = new FileUpload();
c.ID = control.JobControlID + control.ControlTypeName + control.ControlName;
break;
}
cell.Controls.Add(c);
return cell;
}
开发者ID:TCarmack,项目名称:Brentwood,代码行数:26,代码来源:FormBuilder.cs
示例12: BuildStudentGrowthTable
protected void BuildStudentGrowthTable()
{
var table = new HtmlTable();
var headerRow = new HtmlTableRow();
table.Width = "100%";
table.Attributes["class"] = "sgTable";
//Add header row
foreach(DataColumn column in _ds.Tables[1].Columns)
{
var headerCell = new HtmlTableCell();
headerCell.Attributes["class"] = "sgTableHeadCell";
headerCell.InnerHtml = column.ColumnName;
headerRow.Cells.Add(headerCell);
}
table.Rows.Add(headerRow);
//Add body rows
foreach(DataRow row in _ds.Tables[1].Rows)
{
var tableRow = new HtmlTableRow();
foreach(DataColumn column in _ds.Tables[1].Columns)
{
var tableCell = new HtmlTableCell();
tableCell.Attributes["class"] = table.Rows.Count % 2 == 0 ? "" : "altTD";
tableCell.InnerHtml = row[column].ToString();
tableRow.Cells.Add(tableCell);
}
table.Rows.Add(tableRow);
}
if (_ds.Tables[1].Rows.Count > 1 || (_ds.Tables[1].Rows.Count > 0 && !_ds.Tables[1].Rows[0][0].ToString().Contains("N/A")))
{
//Add spacer row
var spacerRow = new HtmlTableRow();
var spacerCell = new HtmlTableCell();
spacerCell.ColSpan = _ds.Tables[1].Columns.Count;
spacerCell.InnerHtml = " ";
spacerCell.BgColor = "bababa";
spacerRow.Cells.Add(spacerCell);
table.Rows.Add(spacerRow);
//Add aggregate concordant row
var concordRow = new HtmlTableRow();
var concordCell1 = new HtmlTableCell();
var concordCell2 = new HtmlTableCell();
concordCell1.ColSpan = _ds.Tables[1].Columns.Count - 1;
concordCell2.InnerHtml = "Aggregate Concordant = <span class=\"normalText\">" + _aggregateConcordant + "</span>";
concordCell2.Attributes["class"] = "sgTableHeadCell";
concordRow.Cells.Add(concordCell1);
concordRow.Cells.Add(concordCell2);
table.Rows.Add(concordRow);
}
//Add table to panel
studentGrowDataTable.Controls.Add(table);
}
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:59,代码来源:StudentGrowthData.aspx.cs
示例13: AddLabel
private static HtmlTableCell AddLabel(string labelText)
{
HtmlTableCell cell = new HtmlTableCell();
Label l = new Label();
l.Text = labelText;
cell.Controls.Add(l);
return cell;
}
开发者ID:TCarmack,项目名称:Brentwood,代码行数:8,代码来源:FormBuilder.cs
示例14: GetFieldCell
internal static HtmlTableCell GetFieldCell()
{
using (HtmlTableCell cell = new HtmlTableCell())
{
cell.Attributes.Add("class", "ui field");
return cell;
}
}
开发者ID:njmube,项目名称:mixerp,代码行数:8,代码来源:TableHelper.cs
示例15: BuildTableRow
public static void BuildTableRow(HtmlTable table, TmpAward item)
{
var tr = new HtmlTableRow();
var cell = new HtmlTableCell();
cell.InnerText = item.TicketNO;
tr.Cells.Add(cell);
table.Rows.Add(tr);
}
开发者ID:JuRogn,项目名称:OA,代码行数:8,代码来源:sz.aspx.cs
示例16: LoadData
private void LoadData()
{
/* Get our standard from TileParms collection. */
var oStd = (Thinkgate.Base.Classes.Standards)Tile.TileParms.GetParm("standards");
/* populate controls from our standard. */
StdsPage_StdsContent_DivStdTitle.InnerText = BuildStdTitle(oStd);
StdsPage_StdsContent_DivStdText.InnerHtml = oStd.Desc;
/* populate parent information if our standard has a parent */
if (oStd.Parent != null)
{
StdsPage_StdsContent_DivStdParentTitle.InnerText = BuildStdTitle(oStd.Parent);
StdsPage_StdsContent_DivStdParentText.InnerHtml = oStd.Parent.Desc;
}
else
{
StdsPage_StdsContent_DivStdParentTitle.InnerText = "";
StdsPage_StdsContent_DivStdParentText.InnerText = "";
}
/* populate children informationif our standard has children */
if (oStd.Children.Count >0)
{
sb = new StringBuilder("");
HtmlTable oTbl = new HtmlTable();
HtmlTableRow oRow;
HtmlTableCell oCell;
System.Web.UI.HtmlControls.HtmlGenericControl oDiv;
foreach (Thinkgate.Base.Classes.Standards oChildStd in oStd.Children)
{
oRow = new HtmlTableRow();
oCell = new HtmlTableCell();
oDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
oDiv.Attributes.Add("class", "stdTitle");
oDiv.Style.Add("display","block");
oDiv.InnerText = BuildStdTitle(oChildStd);
oCell.Controls.Add(oDiv);
oDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
oDiv.Attributes.Add("class", "stdText");
oDiv.Style.Add("display", "block");
oDiv.InnerHtml = oChildStd.Desc;
oCell.Controls.Add(oDiv);
oRow.Cells.Add(oCell);
oTbl.Rows.Add(oRow);
}
StdsPage_StdsContent_divStdChildren.Controls.Add(oTbl);
}
}
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:58,代码来源:StandardsContent.ascx.cs
示例17: OnInit
override protected void OnInit(EventArgs e)
{
base.OnInit(e);
node = new cms.businesslogic.CMSNode(int.Parse(helper.Request("id")));
HtmlTable ht = new HtmlTable();
ht.CellPadding = 4;
HtmlTableRow captions = new HtmlTableRow();
captions.Cells.Add(new HtmlTableCell());
ArrayList actionList = BusinessLogic.Actions.Action.GetAll();
foreach (interfaces.IAction a in actionList)
{
if (a.CanBePermissionAssigned)
{
HtmlTableCell hc = new HtmlTableCell();
hc.Attributes.Add("class", "guiDialogTinyMark");
hc.Controls.Add(new LiteralControl(ui.Text("actions", a.Alias)));
captions.Cells.Add(hc);
}
}
ht.Rows.Add(captions);
foreach (BusinessLogic.User u in BusinessLogic.User.getAll())
{
// Not disabled users and not system account
if (!u.Disabled && u.Id > 0)
{
HtmlTableRow hr = new HtmlTableRow();
HtmlTableCell hc = new HtmlTableCell();
hc.Attributes.Add("class", "guiDialogTinyMark");
hc.Controls.Add(new LiteralControl(u.Name));
hr.Cells.Add(hc);
foreach (interfaces.IAction a in BusinessLogic.Actions.Action.GetAll())
{
CheckBox c = new CheckBox();
c.ID = u.Id + "_" + a.Letter;
if (a.CanBePermissionAssigned)
{
if (u.GetPermissions(node.Path).IndexOf(a.Letter) > -1)
c.Checked = true;
HtmlTableCell cell = new HtmlTableCell();
cell.Style.Add("text-align", "center");
cell.Controls.Add(c);
permissions.Add(c);
hr.Cells.Add(cell);
}
}
ht.Rows.Add(hr);
}
}
PlaceHolder1.Controls.Add(ht);
}
开发者ID:phaniarveti,项目名称:Experiments,代码行数:58,代码来源:cruds.aspx.cs
示例18: LoadTopPanel
private void LoadTopPanel(Panel topPanel)
{
topPanel.CssClass = this.TopPanelCssClass;
using (HtmlTable table = new HtmlTable())
{
using (HtmlTableRow row = new HtmlTableRow())
{
using (HtmlTableCell dropDownListCell = new HtmlTableCell())
{
filterDropDownList = new DropDownList();
filterDropDownList.ID = "FilterDropDownList";
filterDropDownList.CssClass = this.FilterDropDownListCssClass;
filterDropDownList.DataTextField = "column_name";
filterDropDownList.DataValueField = "column_name";
filterDropDownList.DataBound += this.FilterDropDownList_DataBound;
dropDownListCell.Controls.Add(filterDropDownList);
row.Cells.Add(dropDownListCell);
}
using (HtmlTableCell textBoxCell = new HtmlTableCell())
{
filterTextBox = new TextBox();
filterTextBox.ID = "FilterTextBox";
filterTextBox.CssClass = this.FilterTextBoxCssClass;
textBoxCell.Controls.Add(filterTextBox);
row.Cells.Add(textBoxCell);
}
using (HtmlTableCell buttonCell = new HtmlTableCell())
{
goButton = new Button();
goButton.ID = "GoButton";
goButton.CssClass = this.ButtonCssClass;
if (this.ButtonHeight != null)
{
goButton.Height = this.ButtonHeight;
}
if (this.ButtonWidth != null)
{
goButton.Width = this.ButtonWidth;
}
goButton.Click += this.GoButton_Click;
goButton.Text = Resources.ScrudResource.Go;
buttonCell.Controls.Add(goButton);
row.Cells.Add(buttonCell);
}
table.Rows.Add(row);
topPanel.Controls.Add(table);
}
}
}
开发者ID:prabhatjc,项目名称:mixerp,代码行数:57,代码来源:ItemSelector.cs
示例19: AddCell
internal static void AddCell(HtmlTableRow row, string text)
{
using (HtmlTableCell cell = new HtmlTableCell())
{
cell.InnerHtml = text;
row.Cells.Add(cell);
}
}
开发者ID:njmube,项目名称:mixerp,代码行数:9,代码来源:TableHelper.cs
示例20: AddTH
private void AddTH(string title, int colspan)
{
HtmlTableRow tr = new HtmlTableRow();
HtmlTableCell th = new HtmlTableCell("th");
th.InnerHtml = title;
th.ColSpan = colspan;
tr.Cells.Add(th);
tblProducts.Rows.Add(tr);
}
开发者ID:ViniciusConsultor,项目名称:noname-netshop,代码行数:9,代码来源:ProductCompare.aspx.cs
注:本文中的System.Web.UI.HtmlControls.HtmlTableCell类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论