The custom server control does not inherit the supportseventvalidation feature of the parent class/base class.

Source: Internet
Author: User
Author: failing Program Member-eight gods

Msdn does not mean that it cannot be inherited. In fact, it cannot be inherited.

You can see comments in the source code of the supportseventvalidationattribute class.
Note that this attribute does not inherit from the base class, since Derived classes may not be able to validate properly.

I prefer to see clear statements, such:
[Attributeusageattribute (attributetargets. Class, inherited =False, Allowmultiple =False)], And it does not declare this.

Let's take a look at the Declaration of the serializable feature, which makes it clear that it cannot be inherited, so we must include the declaration of this feature when writing the serialization class.

[Attributeusageattribute (attributetargets. Class | attributetargets. struct | attributetargets. Enum | attributetargets. Delegate, inherited =False)]

Public Sealed Class Serializableattribute: Attribute

This attribute is added in ASP. NET 2.0.
It is used to verify the validity of the data returned by the user control.
For example, the drop-down list box provides a one-to-31 day selection, but the client modifies the data
If a 32 value is submitted, the ASP. NET Framework throws an exception saying that the submitted data is invalid.
Many controls perform such verification, such as dropdownlist checkbox...
Develop custom controls. to verify data security, refer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.