I looked through an article about event bubbles in asp.net and found out that although it is possible to subscribe to the click event of a user’s control button from the containing page, "this will break the part of the object-oriented encapsulation rules object." The best idea is to publish the event in a user control to allow any interested parties to handle the event.
My question is, how exactly does a direct subscription to the button click event from the contained page violate object-oriented encapsulation rules?
Apologizes if his dumb question .: |
Thank!
, UserControl.
UserControl, UserControl. UserControl - "", , .
, UserControl v1.1 btnSubmit SubmissionButton, .
UserControl .
, . click, ImageButton, LinkButton ..
, , , . , .