C# Class Subtext.Web.Controls.ControlHelper

Static class containing helper methods for various controls that can't be placed within the control hierarchy.
Afficher le fichier Open project: ayende/Subtext

Méthodes publiques

Méthode Description
AddCssClass ( HtmlControl control, string cssClass ) : void
AddCssClass ( WebControl control, string cssClass ) : void
ApplyRecursively ( ControlAction controlAction, Control root ) : void

Applies the specified control action recursively.

ExportToExcel ( Control control, string filename ) : void

Exports the specified control to excel.

Calling this function will prompt the user with a dialog to save the trade blotter grid as an Excel file named TradeBlotter.xls.

FindControlRecursively ( Control parent, string id ) : Control

Recursively searches for the server form.

GetPageFormClientId ( Control parent ) : string

Recursively searches for the server form's client id.

IsAttributeDefined ( HtmlControl control, string name ) : bool

Returns true if the specified attribute is defined on the control.

IsAttributeDefined ( WebControl control, string name ) : bool

Returns true if the specified attribute is defined on the control.

SetTitleIfNone ( HyperLink link, string title ) : void
SetTitleIfNone ( LinkButton link, string title ) : void

Private Methods

Méthode Description
SetTitleIfNoneInternal ( WebControl link, string title ) : void

Sets the title attribute for the hyperlink if none exists.

Method Details

AddCssClass() public static méthode

public static AddCssClass ( HtmlControl control, string cssClass ) : void
control System.Web.UI.HtmlControls.HtmlControl
cssClass string
Résultat void

AddCssClass() public static méthode

public static AddCssClass ( WebControl control, string cssClass ) : void
control System.Web.UI.WebControls.WebControl
cssClass string
Résultat void

ApplyRecursively() public static méthode

Applies the specified control action recursively.
public static ApplyRecursively ( ControlAction controlAction, Control root ) : void
controlAction ControlAction The control action.
root System.Web.UI.Control The root control.
Résultat void

ExportToExcel() public static méthode

Exports the specified control to excel.
Calling this function will prompt the user with a dialog to save the trade blotter grid as an Excel file named TradeBlotter.xls.
public static ExportToExcel ( Control control, string filename ) : void
control System.Web.UI.Control
filename string
Résultat void

FindControlRecursively() public static méthode

Recursively searches for the server form.
public static FindControlRecursively ( Control parent, string id ) : Control
parent System.Web.UI.Control The parent to start the recursive search from.
id string Id of the control to find.
Résultat System.Web.UI.Control

GetPageFormClientId() public static méthode

Recursively searches for the server form's client id.
public static GetPageFormClientId ( Control parent ) : string
parent System.Web.UI.Control The parent.
Résultat string

IsAttributeDefined() public static méthode

Returns true if the specified attribute is defined on the control.
public static IsAttributeDefined ( HtmlControl control, string name ) : bool
control System.Web.UI.HtmlControls.HtmlControl Control.
name string Name.
Résultat bool

IsAttributeDefined() public static méthode

Returns true if the specified attribute is defined on the control.
public static IsAttributeDefined ( WebControl control, string name ) : bool
control System.Web.UI.WebControls.WebControl Control.
name string Name.
Résultat bool

SetTitleIfNone() public static méthode

public static SetTitleIfNone ( HyperLink link, string title ) : void
link System.Web.UI.WebControls.HyperLink
title string
Résultat void

SetTitleIfNone() public static méthode

public static SetTitleIfNone ( LinkButton link, string title ) : void
link System.Web.UI.WebControls.LinkButton
title string
Résultat void