本文整理汇总了C#中HtmlTags.HtmlTag.Id方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTag.Id方法的具体用法?C# HtmlTag.Id怎么用?C# HtmlTag.Id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlTags.HtmlTag
的用法示例。
在下文中一共展示了HtmlTag.Id方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
public override HtmlTag Build(ElementRequest request)
{
HtmlTag root = new HtmlTag("a");
root.Attr("href", "#");
root.Id(request.Accessor.FieldName);
root.Append(new HtmlTag("span").Text(request.StringValue()));
return root;
}
示例2: Build
public override HtmlTag Build(ElementRequest request)
{
HtmlTag root = new HtmlTag("a");
root.Attr("href", request.RawValue);
root.Attr("target", "_blank");
root.Id(request.Accessor.FieldName);
var img = new HtmlTag("img");
img.Attr("src", request.RawValue);
root.Append(img);
return root;
}
示例3: get__fubu
public HtmlDocument get__fubu()
{
var document = new HtmlDocument
{
Title = "FubuMVC Diagnostics"
};
writeStyles(document);
var div = new HtmlTag("div");
div.Id("diagnostics");
var foot = new HtmlTag("foot");
document.Body.Children.Add(div);
document.Body.Children.Add(foot);
writeScripts(foot);
return document;
}
示例4: ToHtmlTag
public HtmlTag ToHtmlTag()
{
AddClass("entity-link-list");
var rootTag = ToHtmlTagBase();
var ul = new HtmlTag("ul");
if (_filGroup)
{
ul.AddClasses(new[] { "ccMenu" });
}else
{
ul.AddClasses(new[] { "main-tabs" });
ul.Id("main-tabs");
}
renderListItems(ul, _items);
rootTag.Children.Add(ul);
return rootTag;
}
示例5: FilterTemplatesFor
public HtmlTag FilterTemplatesFor(GridViewModel model)
{
var tag = new HtmlTag("div");
var containerNameForGrid = model.GridType.ContainerNameForGrid();
tag.Id("filters_" + containerNameForGrid);
tag.AddClass("smart-grid-filter");
tag.Append(new TableTag());
var metadata = new Dictionary<string, object>{
{"gridId", "grid_" + model.GridName},
{"initialCriteria", model.InitialCriteria()}
};
tag.MetaData("filters", metadata);
var properties = model.FilteredProperties;
var templates = _sources.Distinct().SelectMany(x => x.TagsFor(properties));
var operators = properties.Select(prop =>
{
return new SelectTag(select =>
{
prop.Operators.Each(oper => select.Option(oper.ToString(), oper.Key));
}).AddClass(prop.Accessor.Name);
});
tag.Add("div", div =>
{
div.Hide();
div.AddClass("templates");
div.Add("div").AddClass("smart-grid-editors").Append(templates);
div.Add("div").AddClass("smart-grid-operators").Append(operators);
div.Append(new SelectTag(select =>
{
select.AddClass("smart-grid-properties");
properties.Each(prop => select.Option(prop.Header, prop.Accessor.Name));
}));
});
return tag;
}