![](/img/trans.png)
[英]Is there a way to access control properties within custom user control from Designer using c# (Windows Forms)
[英]C# User Control - Accessing control properties from within user control
我正在构建一系列用户控件,当我将第三方控件放在窗体(Telerik RadGridview)上时,无法访问它的属性。 如果将TextBox放置在控件上,则可以正常访问它的属性。
有什么理由会这样吗? 如何克服这个问题?
确保在您的Web.Config中或使用用户控件内部的@Register声明正确注册了第三方控件。 这是web.config条目的示例:
<controls>
<add tagPrefix="CTRL" assembly="MyCustomControlsAssemblyName" namespace="MyCustomControls.SomeNamespace" />
</controls>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.