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 322 | Next

Rob Cameron and Dale Michalk

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

The INamingContainer interface tells
ASP.NET to do this. INamingContainer is a marker interface (i.e., an interface without any defined
methods) used by ASP.NET to identify the parent in a composite control to ensure unique names
or IDs for child controls as they are dynamically created during the page-rendering process.
Implementing the INamingContainer interface in the Pager server control activates this
mechanism, causing ASP.NET to prefix the ID of a control with the parent control??™s ID and a
colon. The previous left button in a Pager control named "pagerbtn" would therefore have an
ID value of "buttonLeft" but a UniqueID value of "pagerbtn$buttonLeft". Listing 5-16 contains
the full code listing for the Pager control.
230 CHAPTER 5 ?–  SE RVER CONTROL EVENTS
Listing 5-16. The Pager Control Class File
using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using ControlsBook2Lib.Ch11.Design;
namespace ControlsBook2Lib.Ch05
{
[ToolboxData("<{0}:pager runat=server>")]
public class Pager : CompositeControl
{
private static readonly object PageCommandKey = new object();
public event PageCommandEventHandler PageCommand
{
add
{
Events.AddHandler(PageCommandKey, value);
}
remove
{
Events.


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