本文整理汇总了C#中HtmlTextWriterAttribute.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTextWriterAttribute.ToString方法的具体用法?C# HtmlTextWriterAttribute.ToString怎么用?C# HtmlTextWriterAttribute.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlTextWriterAttribute
的用法示例。
在下文中一共展示了HtmlTextWriterAttribute.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddAttribute
public override void AddAttribute(HtmlTextWriterAttribute key, string value)
{
if (((key == HtmlTextWriterAttribute.Src) || (key == HtmlTextWriterAttribute.Href)) || (key == HtmlTextWriterAttribute.Background))
{
base.AddAttribute(key.ToString(), value, key);
}
else
{
base.AddAttribute(key, value);
}
}
示例2: HtmlAttribute
/// <summary>
/// Initializes a new instance of the HtmlAttribute class.
/// </summary>
/// <param name="attribute">The attribute.</param>
/// <param name="value">The value of the attribute.</param>
public HtmlAttribute(HtmlTextWriterAttribute attribute, string value)
{
this.Name = attribute.ToString().ToLower();
this.Value = value;
}
示例3: GetAttributeName
private String GetAttributeName(HtmlTextWriterAttribute key)
{
String name = key.ToString().ToLower();
if (name.Contains(".")) name = name.Substring(name.LastIndexOf(".") + 1);
return name;
}
示例4: Attribute
public static ISgmlWriter Attribute(this ISgmlWriter writer, HtmlTextWriterAttribute name, object value)
{
writer.Attribute(name.ToString(), value);
return writer;
}