C# Class OpenSlx.Lib.Web.Extensions.UserControlExtensions

Useful extension methods for web user controls that are used as smart parts.
Afficher le fichier Open project: nicocrm/OpenSlx

Méthodes publiques

Méthode Description
JavaScript ( this ctl, String script ) : void

Send a script to the page. A shortcut for ScriptManager.RegisterStartupScript.

LockForm ( this parent, bool islocked ) : void

Enable / disable all controls on the form. Controls with ViewState disabled are ignored.

MessageBox ( this ctl, String msg, String callback = null ) : void

Convenience function to show an alert message to the user, without using the javascript (modal) function. Note that you can generally only show 1 per page.

Method Details

JavaScript() public static méthode

Send a script to the page. A shortcut for ScriptManager.RegisterStartupScript.
public static JavaScript ( this ctl, String script ) : void
ctl this
script String
Résultat void

LockForm() public static méthode

Enable / disable all controls on the form. Controls with ViewState disabled are ignored.
public static LockForm ( this parent, bool islocked ) : void
parent this The control to be disabled (usually called from a form as this.LockForm(true))
islocked bool
Résultat void

MessageBox() public static méthode

Convenience function to show an alert message to the user, without using the javascript (modal) function. Note that you can generally only show 1 per page.
public static MessageBox ( this ctl, String msg, String callback = null ) : void
ctl this
msg String
callback String Can specify javascript code to be run when user closes the message box. /// This needs to be specified as a Javascript function, for example "function() { alert('boo') }"
Résultat void