Search

Wednesday, January 22, 2014
0 comments

Computer Programming: Control class properties, methods and events

7:33 AMWednesday, January 22, 2014
The System.web.UI.Control class is the base class for all Web server controls. This class is derived directly from the object class, which resides in the System namespace. Here is the hierarchy of the control class:
System.Object
      System
             web.UI.Control

Public Properties of control class

AppRelativeTemplateSourceDirectory : Obtains the application-relative virtual directory of the Page or UserControl that contains this control
BindingContainer : Obtains the control that contains this control's data binding
ClientID : Obtains the server control identifier generated by ASP.NET
Controls : Obtains a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy
EnableTheming : Obtains a value indicating whether themes apply to his control.
EnableViewState : Obtains a value indicating whether the server control persists its view-state, and the view-state of any child controls it contains.
ID : Obtains the programmatic identifier assigned to the server control
NamingContainer : Obtains a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same System.Web.UI.Control.ID property Value.
Page : Obtains a reference to the Page instance that contains the server control.
Parent : Obtains a reference to the server control's parent control in the page control hierarchy
Site : Obtains information about the container that hosts the current control when rendered on a design surface.
SkidID : Obtains the skin to apply to the control.
TemplateControl : Obtains a reference to the template that contains this control
TemplateSourceDirectory: Obtains the virtual directory of the Page or UserControl that contains the current server control.
UniqueID : Obtains the unique , hierarchically-qualified identifier for the server control.
Visible : Obtains a value that indicates whether a server control is rendered as UI on the page.

Public Method of control class

ApplyStyleSheetSkin : Helps in applying the style properties defined in the page style sheet to the control
DataBind : Helps in binding a data source to the invoked server control and all its child controls.
Dispose : Helps in enabling a server control to perform final clean up before it is released from memory.
FindControl : Helps in searching the current naming container for the specified server control.
Focus : Helps in setting input focus to a control.
HasControls : Helps in determining if the server control contains any child controls
RenderControl : Helps in output server control content and stores tracing information about the control if tracing is enabled.
ResolveClientUrl : Helps in getting a URL that can be used by the browser.
ResolveUrl : Helps in converting a URL into the desired format
SetRenderMethodDelegate : Helps in assigning an event handler delegate to render the server control and its content into its parent control.

Public Events of Control Class

DataBinding : Occurs when the server control binds to a data source
Dispose : Occurs when a server control is released from memory, which is the last stage of the server control life cycle when an ASP.NET page is requested.
Init : Occurs when the server control is initialized, which is the first step in the life cycle.
Load : Occurs when the server control is loaded into the page object.
PreRender : Occurs when the server control is about to render to its containing Page object.
Unload : Occurs when the server control is unloaded from memory.
Protected by Copyscape Online Copyright Protection Software

0 comments :

Post a Comment

 
Toggle Footer
Top