M
Mike Owen
I have built and used a custom control which works fine.
I now want to add a property that I can set from the various pages where I
use the control.
I have added the following property in the code behind file:
Public Property ContentTypeID() As Int16
Get
Return mContentTypeID
End Get
Set(ByVal value As Int16)
mContentTypeID = value
End Set
End Property
and set it in the page as follows:
<%@ Register TagPrefix="uc1" TagName="_Content" Src="~/_Content.ascx" %>
<uc1:_Content id=_Content ContentTypeID=10 runat="server"></uc1:_Content>
However in design time the error 'Attribute ContentTypeID is not a valid
attribute of element _Content' comes up for the property/attribute
ContentTypeID, and of course the value of 10 is not passed through to the
code behind file.
Any ideas what I am doing wrong?
Thanks, Mike.
I now want to add a property that I can set from the various pages where I
use the control.
I have added the following property in the code behind file:
Public Property ContentTypeID() As Int16
Get
Return mContentTypeID
End Get
Set(ByVal value As Int16)
mContentTypeID = value
End Set
End Property
and set it in the page as follows:
<%@ Register TagPrefix="uc1" TagName="_Content" Src="~/_Content.ascx" %>
<uc1:_Content id=_Content ContentTypeID=10 runat="server"></uc1:_Content>
However in design time the error 'Attribute ContentTypeID is not a valid
attribute of element _Content' comes up for the property/attribute
ContentTypeID, and of course the value of 10 is not passed through to the
code behind file.
Any ideas what I am doing wrong?
Thanks, Mike.