O
oliviers
Here is my scenario:
I first create a base class with one property :
public class MyControl
inherits System.Web.UI.UserControl
Public readonly property IsEditable() boolean
Get
Return False '(More code later)
End Get
End property
End Class
I then create my different usercontrols, deriving from MyControl:
Public class aControl
inherits MyControl
...
End Class
My goal is to make the IsEditable property available when designing my
controls.
So if I use a <asp:hyperlink> control in the aControl control, I'd
like to use the following design source code:
<asp:HyperLink ID="myLink" runat="server" ImageUrl="myImage.gif"
visible='<%# IsEditable %>'></asp:HyperLink>
I guess it should work as I don't get compilation errors but no code
is executing. The link remains visible, I never reach the breakpoint I
set in the property Get code to check what's happening.
Am I missing something?
Olivier
I first create a base class with one property :
public class MyControl
inherits System.Web.UI.UserControl
Public readonly property IsEditable() boolean
Get
Return False '(More code later)
End Get
End property
End Class
I then create my different usercontrols, deriving from MyControl:
Public class aControl
inherits MyControl
...
End Class
My goal is to make the IsEditable property available when designing my
controls.
So if I use a <asp:hyperlink> control in the aControl control, I'd
like to use the following design source code:
<asp:HyperLink ID="myLink" runat="server" ImageUrl="myImage.gif"
visible='<%# IsEditable %>'></asp:HyperLink>
I guess it should work as I don't get compilation errors but no code
is executing. The link remains visible, I never reach the breakpoint I
set in the property Get code to check what's happening.
Am I missing something?
Olivier