How It Works
The property called DisplayDirection gives your user control some extra behavior. Pages using the
control should now set the DisplayDirection like this:
c08.indd 301 08.indd 301 10/8/2012 9:57:04 AM 0/8/2012 9:57:04 AM
302 x CHAPTER 8 USER CONTROLS
When the control instance is created by the ASP.NET run time, the value you set in the control declaration
is assigned to the property DisplayDirection. If you don’t assign a value, the default will be
Horizontal for the current definition of the Direction enum as that’s the first item in the list and has
an implicit value of zero.
When the page loads, this code in the user control is executed: