I have a custom ASP.NET server control CustomControlwith a property attribute Path.
If the value Pathis not explicitly specified, I want the exception to be thrown.
For instance,
<myControls:CustomControl Path="somedirectory/someotherdirectory/somefile.ext" runat="server" />
should compile and
<myControls:CustomControl runat="server" /> should throw an exception.
I understand that I can do this in the getter property Path, but is there any attribute that requires this?
Update
Is there any mechanism for checking property attribute values other than using code properties in getter methods?
source
share