本文整理汇总了C#中System.Web.UI.WebControls.Table.AddRow方法的典型用法代码示例。如果您正苦于以下问题:C# Table.AddRow方法的具体用法?C# Table.AddRow怎么用?C# Table.AddRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.Table
的用法示例。
在下文中一共展示了Table.AddRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildTable
private void BuildTable()
{
Table table = new Table();
table.AddHeaderRow(2, "Notary's sign check cookie");
if (this.cookie != null)
{
table.AddRow("You are:", this.cookie.Certificate.FullName);
table.AddRow(string.Empty, "Sign check cookie set.");
}
else
{
table.AddRow("You are:", "Unknown");
}
table.AddSpaceRow(2, 32);
if (!this.valid)
{
table.AddRow(string.Empty, this.message);
if (!string.IsNullOrEmpty(this.error))
{
table.AddRow(string.Empty, this.error);
}
}
mainPanel.Controls.Add(table);
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
this.table = new Table();
this.maySign = false;
if (ConnectToServer())
{
bool isNotary = ReadSignCheckCookie();
bool requestValid = ReadRequestData();
bool notAlreadySigned = DisplayRequest();
if (isNotary)
{
if (requestValid)
{
if (notAlreadySigned)
{
table.AddRow(string.Empty, "Please verify the name and certificate id matches the paper form before signing.");
this.maySign = true;
Button signButton = new Button();
signButton.ID = "signButton";
signButton.Text = "Sign";
signButton.Click += new EventHandler(signButton_Click);
table.AddRow(null, signButton);
}
else
{
table.AddRow(string.Empty, "You have already signed.");
}
}
else
{
table.AddRow(string.Empty, "You cannot sign because the request is not valid.");
}
}
else
{
table.AddRow(string.Empty, "You are not authorized to sign.");
}
}
mainPanel.Controls.Add(table);
}