Catching usage of "undefined" properties on User Controls RRS feed

  • Question

  • User1285297674 posted

    I just discovered that User Controls seem to let you set a value for any property name for anything in the markup even if that property doesn't exist in the user control class definition.  The page doesn't error or do anything to let you know a potentially invalid property has been assigned. It seems that User Control will accept any property.

    Now, I guess this may be by-design, but is there anyway you can enforce property assignments to ensure they exist? I'd really like to throw an exception if an non-existent property is used.


    Saturday, October 31, 2009 1:46 PM

All replies