私にとって、VB.Netでは、問題は次のとおりでした。
このエラーが発生した場合:error BC30456: "AnyPublicMethodOrProperty" is not a member of 'UserControl'
これは、ユーザーコントロールが、正確に継承されたクラスではなく汎用として宣言されているためですUserControl
。したがって、デザイナーの親ページ(例:)default.aspx.designer.vb
では、コントロールプロパティは、継承されたUserControlクラスではなく、正確にクラス名で宣言する必要があります。
だから...デザイナーの親ページでこれを見つけてみてください:
'''<summary>
'''UcYourControlName control.
'''</summary>
'''<remarks>
'''Auto-generated field.
'''To modify move field declaration from designer file to code-behind file.
'''</remarks>
Protected WithEvents ucYourControlName As Global.System.Web.UI.UserControl
そしてそれをこれに置き換えてください:
'''<summary>
'''UcYourControlName control.
'''</summary>
'''<remarks>
'''Auto-generated field.
'''To modify move field declaration from designer file to code-behind file.
'''</remarks>
Protected WithEvents ucYourControlName As Global.Wherever.Your.UserControl.Namespace.Is.Located.UcYourControlNameClass