SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 321 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

The first check is to cast the EventArgs reference to
ensure we receive a Command event of the proper type. The code performs this check using the
as keyword in C# to cast the reference to the desired type, which returns null if the cast fails.
If the type cast succeeds, the next check is to ensure the proper CommandName is set to "Page".
After the checks pass, the OnBubbleEvent code can create a PageCommandEventArgs class and set
the Direction property according to the CommandArgument value. The final task is to raise the
PageCommand event by calling OnPageCommand. Finally, the function returns the value of result to
tell the ASP.NET framework whether or not the event was handled.
The INamingContainer Interface
When a composite control builds up its child control tree, it sets each control??™s identification
via the ID property. For example, the Pager control sets the left SuperButton child control ID
property value in the following single line of code:
buttonLeft.ID = "buttonLeft";
The problem with using just the ID value to uniquely identify child controls is that multiple
Pager controls could be used on a web form, and the emitted button or hyperlink ID values
would conflict. To protect against name collisions, each composite control creates a unique
namespace that prefixes the ID of a control with the parent control??™s ID (and the parent control??™s
parent??™s ID and so on) and a dollar sign or underscore.


Pages:
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6