积极答复者
自定义控件的前缀, 可以写死吗?

问题
-
[ToolboxData("<{0}:S runat=server></{0}:S>")]
public class S : Literal
如上面的代码中的前缀{0}, 就得在web.config中定义. 请教: 有没有办法写死?- 已移动 肖小勇Moderator 2011年4月19日 4:33 ASP.NET 相关问题 (发件人:.NET Framework 一般性问题讨论区)
答案
-
可以,其它很简单在控件库所在的 AssemblyInfo.cs 中增加 [assembly: TagPrefix("ServerControl1", "custom")] ServerControl1 是指控件库的名称空间, custom 是指自定义的前辍
知识改变命运,奋斗成就人生!- 已标记为答案 Song TianModerator 2011年4月25日 8:33
全部回复
-
可以,其它很简单在控件库所在的 AssemblyInfo.cs 中增加 [assembly: TagPrefix("ServerControl1", "custom")] ServerControl1 是指控件库的名称空间, custom 是指自定义的前辍
知识改变命运,奋斗成就人生!- 已标记为答案 Song TianModerator 2011年4月25日 8:33