本文整理汇总了C#中System.Web.UI.HtmlTextWriter.Ul方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTextWriter.Ul方法的具体用法?C# HtmlTextWriter.Ul怎么用?C# HtmlTextWriter.Ul使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.HtmlTextWriter
的用法示例。
在下文中一共展示了HtmlTextWriter.Ul方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainInformationSection
public MainInformationSection(MainStatistics stats)
{
var strWr = new StringWriter();
using (var writer = new HtmlTextWriter(strWr))
{
writer
.Class("columns")
.Div(() => writer
.Class("one-third column")
.Div(() => writer
.Div(() => writer
.Class("border-bottom p-3 mb-3")
.H2("Time: ")
.Class("border border-0 p-3 mb-3")
.Div(() => writer
.Ul(() => writer
.Li("Start datetime: " + stats.StartDate)
.Li("Finish datetime: " + stats.EndDate)
.Li("Duration: " + stats.Duration)
)
)
)
.Div(() => writer
.Class("border-bottom p-3 mb-3")
.H2("Summary: ")
.Class("border border-0 p-3 mb-3")
.Div(() => writer
.Ul(() => writer
.Li("Total: " + stats.TotalAll)
.Li("Success: " + stats.TotalPassed)
.Li("Errors: " + stats.TotalBroken)
.Li("Failures: " + stats.TotalFailed)
.Li("Inconclusive: " + stats.TotalInconclusive)
.Li("Ignored: " + stats.TotalIgnored)
)
)
)
)
.Class("two-thirds column")
.Div(() => writer
.WithAttr(HtmlTextWriterAttribute.Id, Output.GetStatsPieId())
.Tag(HtmlTextWriterTag.Div)
)
);
}
HtmlCode = strWr.ToString();
}