|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Wednesday, March 29, 2006Exposing Properties of a User ControlObviously, the control developed in our previous example does not do much more than display the current time. If judiciously designed, a user control can actually play an extremely crucial role in systems development practice.
We can develop user controls to encapsulate standard business processes. A user control is essentially a visual component (almost like ActiveX controls and visual JavaBeans), except that it is much easier to develop. Once we develop the component, it can be plugged in many applications, thereby making it easy for the front-end application developers. More importantly, it provides the mechanism to implement standard business processes and maintain their integrity. We will illustrate this concept with an example. In this example, we will encapsulate a simple business rule for computing gross wage.The interesting feature of this control is that it will pass the result of its computation to the host page for further processing. It will also accept a title from the host page and display it within itself.That means we will provide two-way communication between the control and the host page.The run-time view of the control when hosted in a page is shown in Figure 3.92. Figure 3.92 Exposing Properties of a User Control |
0 Comments:
Post a Comment
<< Home