本文整理汇总了C#中HtmlTags.HtmlTag.IsInputElement方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTag.IsInputElement方法的具体用法?C# HtmlTag.IsInputElement怎么用?C# HtmlTag.IsInputElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlTags.HtmlTag
的用法示例。
在下文中一共展示了HtmlTag.IsInputElement方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddElementName
public static void AddElementName(ElementRequest request, HtmlTag tag)
{
if (tag.IsInputElement())
{
tag.Attr("name", request.ElementId);
}
}
示例2: AddElementName
public static void AddElementName(ElementRequest request, HtmlTag tag)
{
if (tag.IsInputElement())
{
tag.Attr(HtmlAttributeConstants.Name, request.ElementId);
}
}
示例3: AddElementName
public static void AddElementName(ElementRequest request, HtmlTag tag)
{
if (tag.IsInputElement())
{
tag.Attr("name", request.ElementId);
tag.Attr("id", idRegex.Replace(request.ElementId, "_"));
}
}
示例4: AddElementName
public static void AddElementName(ElementRequest request, HtmlTag tag)
{
if (tag.IsInputElement())
{
var name = request.Accessor.Name;
if (request.Accessor is PropertyChain)
{
name = ((PropertyChain)(request.Accessor)).PropertyNames.Aggregate((current, next) => current + "." + next);
if (new InheritsFromDomainEntity().execute(request.Accessor.PropertyType))
name += ".EntityId";
}
//var name = request.Accessor.Name.Substring(0, request.Accessor.Name.IndexOf(request.Accessor.FieldName)) + "." + request.Accessor.FieldName;
//tag.Attr("name", name);
tag.Attr("name", name);
}
}
示例5: AddElementName
public static void AddElementName(ElementRequest request, HtmlTag tag)
{
if (tag.IsInputElement())
{
var name = request.Accessor.Name;
if (request.Accessor is FubuMVC.Core.Util.PropertyChain)
{
name = ((FubuMVC.Core.Util.PropertyChain)(request.Accessor)).Names.Aggregate((current, next) => current + "." + next);
var isDomainEntity =false;
var de = request.Accessor.PropertyType.BaseType;
while(de.Name!="Object")
{
if (de.Name == "DomainEntity") isDomainEntity = true;
de = de.BaseType;
}
if (isDomainEntity) name += ".EntityId";
}
//var name = request.Accessor.Name.Substring(0, request.Accessor.Name.IndexOf(request.Accessor.FieldName)) + "." + request.Accessor.FieldName;
//tag.Attr("name", name);
tag.Attr("name", name);
}
}