如何创建自定义内容控件? [英] How To Create A Custom Content Control?
问题描述
您好,
我需要创建自己的自定义内容控件以绑定到我的母版页上的asp:ContentPlaceHolder.
我试图从System.Web.Ui派生. WebControls.Content,但没有成功.在我看来,派生的内容控件永远不会被实例化.
我知道我可以将asp:content包裹在任何用户控件周围,但这是一种间接方式,我不喜欢.
是否有机会将自定义内容控件绑定到CustomPlaceHolder控件?
TIA
Marc
Hi there,
i need to create my own custom content control to bind to an asp:ContentPlaceHolder on my master page.
I tried to derive from System.Web.Ui.WebControls.Content, but with no success. It seems to me, that my derived content control would never be instanciated.
I know i can wrap a asp:content around any user control, but this is a kind of indirection, i do not like.
Is there any chance to bind a custom content control to a CustomPlaceHolder control?
TIA
Marc
推荐答案
您好
感谢您的发帖!我建议将您的问题发布到
Thank you for your post! I would suggest posting your question in
或
MSDN>论坛首页> .NET开发位于此处:
MSDN > Forums Home > .NET Development located here:
http://social.msdn. microsoft.com/Forums/zh-CN/category/netdevelopment
希望有帮助.
祝你有美好的一天!
这篇关于如何创建自定义内容控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!