日期:2014-05-19  浏览次数:20426 次

|M| 我们都知道writer.AddAttribute("message", Message)可以添加属性,那如何删除某个属性
如题

我找不到removeattribute这样的

------解决方案--------------------
this.Button1.Attributes.Remove( "onfocus ");
------解决方案--------------------
Attributes有Remove方法。
------解决方案--------------------
Attributes.Remove(key)
------解决方案--------------------
添加时用Attributes.Add
删除时用Attributes.Remove
------解决方案--------------------
writer是一种顺序的写入器,把字符写入到输出缓存中,只能写。不然怎么叫Writer呢。
------解决方案--------------------
习惯一下.net的习惯,

.Attributes.Add / .Attributes.Remove


------解决方案--------------------
添加时用Attributes.Add
删除时用Attributes.Remove
------解决方案--------------------
Attributes.Remove()
------解决方案--------------------
up
------解决方案--------------------
HtmlTextWriter 写入 没有 楼主需要的那种Remove功能