Tasarımcı sınıfta değil gerçek tip olur arkasındaki kod:özel denetim bir ascx ile tanımlanan genel "UserControl" ve ben (kodda VB.NET) ASP.NET özel bir kontrole sahip
Namespace Controls
Public Class MyControl
Inherits System.Web.UI.UserControl
Bu, bir kütüphanede ayarlanır. Ben oluştururken, ben
'MyCustomProperty' diyerek bir hata alıyorum, ancak
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="mypage.aspx.vb" Inherits="myproject.mypage" culture="auto" meta:resourcekey="Page" uiculture="auto" Transaction="RequiresNew" MasterPageFile="Mynamespace.Master" Theme="ThemeBase2" StylesheetTheme="ThemeBase2" %> <%@ Register tagprefix="Controls" tagname="MyControl" src="../Controls/MyControl.ascx" %> <%-- some asp.net --%> <Controls:MyControl ID="mycontrol1" runat="server" MyCustomProperty="value" />
'System.Web.UI.UserControl üyesi değildir: Farklı proje bir sayfada bu denetimi kullanır '.
Ve designer.vb sayfasında
görüyorum:Protected WithEvents mycontrol1 As Global.System.Web.UI.UserControl
Nasıl bu hale sağlarım:
Protected WithEvents mycontrol1 As Global.Mynamespace.Controls.MyControl
?
Başka bir projede * kullanıcı denetimlerinin * (normal sunucu denetimlerinin tersine) referans alınmasının desteklenen bir senaryo olduğundan emin değilim. –