UserControl Required Property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hopefully a simple one, what is the syntax to force a property to be required
in a user control?

I thought it would below, but it's not:

Public Required Property propName() As String
 
You need to create Interface class for that

Interface Icontrol
' Declare an interface.
Property MustHave() As String

End Interface

Then in your user control include
Public Class mycontrol
Inherits System.Web.UI.UserControl
Implements Icontrol

It makes this propery required
 
Back
Top