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

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

Public Methods

Method 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 method

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

LockForm() public static method

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
return void

MessageBox() public static method

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') }"
return void