Public Member Functions | |
[Anthem.Method] void | FireEvent () |
This is an empty method used as the target for the Anthem_FireEvent function. That function sets the __EVENTTARGET to the desired ID which causes the appropriate event to fire on the server so nothing needs to be done here. | |
Static Public Member Functions | |
static void | AddScriptAttribute (ASP.WebControl control, string attributeName, string script) |
Adds the script to the control's attribute collection. | |
static void | AddScriptAttribute (ASP.WebControl control, ASP.ListItem item, string attributeName, string script) |
Adds the script to the item's attribute collection. | |
static void | AddScriptForClientSideEval (string script) |
Add the script to a list of scripts to be evaluated on the client during the callback response processing. | |
static string | GetCallbackEventReference (ICallBackControl control, bool causesValidation, string validationGroup) |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server. | |
static string | GetCallbackEventReference (ICallBackControl control, string argument, bool causesValidation, string validationGroup) |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server. | |
static string | GetCallbackEventReference (ICallBackControl control, bool causesValidation, string validationGroup, string imageDuringCallback) |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server. | |
static string | GetCallbackEventReference (ICallBackControl control, string argument, bool causesValidation, string validationGroup, string imageDuringCallback) |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server. | |
static bool | GetControlVisible (Control control, StateBag viewstate, bool designMode) |
Returns a value indicating if the control is visible on the client. | |
static Manager | GetManager () |
Returns a refernce to Anthem.Manager. | |
static string | GetStringEndingWithSemicolon (string value) |
Returns the input string ending with a semicolon (;). | |
static void | Register (Page page) |
Registers the page with Anthem.Manager. | |
static void | Register (Control control) |
Registers the control with Anthem.Manager. | |
static void | RegisterClientScriptBlock (Type type, String key, String script) |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal. | |
static void | RegisterClientScriptBlock (Type type, String key, String script, Boolean addScriptTags) |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal. | |
static void | RegisterClientScriptBlock (String key, String script) |
Registers the client script with the Page object and with Anthem.Manager using a key and script literal. | |
static void | RegisterClientScriptInclude (String key, String url) |
Registers the client script include with the Page object and Anthem.Manager using a key, and a URL. | |
static void | RegisterClientScriptInclude (Type type, String key, String url) |
Registers the client script include with the Page object and Anthem.Manager using a type, a key, and a URL. | |
static void | RegisterClientScriptResource (Type type, String resourceName) |
Registers the client script resource with the Page object and with Anthem.Manager using a type and a resource name. | |
static void | RegisterPageScriptBlock (string key, string script) |
Registers the client script with Anthem.Manager using a key and a script literal. | |
static void | RegisterStartupScript (Type type, String key, String script) |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal. | |
static void | RegisterStartupScript (Type type, String key, String script, Boolean addScriptTags) |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal. | |
static void | RegisterStartupScript (String key, String script) |
Registers the client script with the Page object and with Anthem.Manager using a key, and script literal. | |
static void | SetControlVisible (StateBag viewState, bool value) |
Sets the visibility of the control on the client. | |
static void | WriteBeginControlMarker (HtmlTextWriter writer, string parentTagName, Control control) |
This method needs to be called by custom controls that want their innerHTML to be automatically updated on the client pages during call backs. Call this at the top of the Render override. The parentTagName argument should be "div" or "span" depending on the type of control. It's this parent element that actually gets its innerHTML updated after call backs. | |
static void | WriteEndControlMarker (HtmlTextWriter writer, string parentTagName, Control control) |
This method needs to be called by custom controls that want their innerHTML to be automatically updated on the client pages during call backs. Call this at the bottom of the Render override. | |
static void | WriteResult (HttpResponse resp, object val, string error) |
Writes the val and error to the callback response. | |
static void | WriteValue (StringBuilder sb, object val) |
Writes the val to sb in a format that can be interpreted by Anthem.js on the client. | |
static void | AddCallBacks (Control control, bool enabledDuringCallBack, string textDuringCallBack, string preCallBackFunction, string postCallBackFunction, string callBackCancelledFunction) |
Add generic callbacks events to all the child controls in the container. This is used by template controls (eg. DataGrid). | |
Properties | |
static string | CallBackID [get] |
A string which uniquely identifies the current callback. | |
static string | CallBackMethod [get] |
The method to invoke during the callback. | |
static string | CallBackType [get] |
A string value which indicates whether the callback is being made using XMLHttpRequest or a hidden IFRAME. | |
static bool | IncludePageScripts [get, set] |
When true, Anthem.Manager will include all page level scripts in the callback response. Use this if you add or show 3rd party controls during the callback that add or change client scripts in the page. | |
static bool | IsCallBack [get] |
Returns true if the current POST is a callback. |
Definition at line 30 of file Manager.cs.
static void Anthem.Manager.AddScriptAttribute | ( | ASP.WebControl | control, | |
string | attributeName, | |||
string | script | |||
) | [static] |
Adds the script to the control's attribute collection.
If the attribute already exists, the script is prepended to the existing value.
control | The control to modify. | |
attributeName | The attribute to modify. | |
script | The script to add to the attribute. |
Definition at line 130 of file Manager.cs.
Referenced by Anthem.Manager.AddCallBacks().
static void Anthem.Manager.AddScriptAttribute | ( | ASP.WebControl | control, | |
ASP.ListItem | item, | |||
string | attributeName, | |||
string | script | |||
) | [static] |
Adds the script to the item's attribute collection.
control | The control to modify. | |
item | The System.Web.UI.WebControls.ListItem to modify. | |
attributeName | The attribute to modify. | |
script | The script to add. |
Definition at line 152 of file Manager.cs.
static void Anthem.Manager.AddScriptForClientSideEval | ( | string | script | ) | [static] |
Add the script to a list of scripts to be evaluated on the client during the callback response processing.
To not include <script></script> tags.
Anthem.Manager.AddScriptForClientSideEval("alert('Hello');");
script | The script to evaluate. |
Definition at line 180 of file Manager.cs.
static string Anthem.Manager.GetCallbackEventReference | ( | ICallBackControl | control, | |
bool | causesValidation, | |||
string | validationGroup | |||
) | [static] |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server.
Definition at line 189 of file Manager.cs.
Referenced by Anthem.Manager.GetCallbackEventReference().
static string Anthem.Manager.GetCallbackEventReference | ( | ICallBackControl | control, | |
string | argument, | |||
bool | causesValidation, | |||
string | validationGroup | |||
) | [static] |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server.
Definition at line 198 of file Manager.cs.
static string Anthem.Manager.GetCallbackEventReference | ( | ICallBackControl | control, | |
bool | causesValidation, | |||
string | validationGroup, | |||
string | imageDuringCallback | |||
) | [static] |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server.
Definition at line 207 of file Manager.cs.
static string Anthem.Manager.GetCallbackEventReference | ( | ICallBackControl | control, | |
string | argument, | |||
bool | causesValidation, | |||
string | validationGroup, | |||
string | imageDuringCallback | |||
) | [static] |
Obtains a reference to a clinet-side javascript function that causes, when invoked, the client to callback to the server.
Definition at line 216 of file Manager.cs.
static bool Anthem.Manager.GetControlVisible | ( | Control | control, | |
StateBag | viewstate, | |||
bool | designMode | |||
) | [static] |
Returns a value indicating if the control is visible on the client.
Definition at line 234 of file Manager.cs.
static Manager Anthem.Manager.GetManager | ( | ) | [static] |
Returns a refernce to Anthem.Manager.
Definition at line 246 of file Manager.cs.
Referenced by Anthem.Manager.AddScriptForClientSideEval(), and Anthem.Manager.RegisterPageScriptBlock().
static string Anthem.Manager.GetStringEndingWithSemicolon | ( | string | value | ) | [static] |
Returns the input string ending with a semicolon (;).
Definition at line 255 of file Manager.cs.
Referenced by Anthem.Manager.AddScriptAttribute().
static void Anthem.Manager.Register | ( | Page | page | ) | [static] |
Registers the page with Anthem.Manager.
Definition at line 269 of file Manager.cs.
Referenced by Anthem.Manager.Register().
static void Anthem.Manager.Register | ( | Control | control | ) | [static] |
static void Anthem.Manager.RegisterClientScriptBlock | ( | Type | type, | |
String | key, | |||
String | script | |||
) | [static] |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal.
type | The type of the client script to register. | |
key | The key of the client script to register. | |
script | The client script literal to register. |
A client script is uniquely identified by its key and its type. Scripts with the same key and type are considered duplicates. Only one script with a given type and key pair can be registered with the page. Attempting to register a script that is already registered does not create a duplicate of the script.
Call the Page.IsClientScriptBlockRegistered method to determine whether a client script with a given key and type pair is already registered and avoid unnecessarily attempting to add the script.
In this overload of the RegisterClientScriptBlock method, you must make sure that the script provided in the script parameter is wrapped in a <script> element block.
The RegisterClientScriptBlock method adds a script block to the top of the rendered page when it is first rendered. All script blocks are rendered in the <head> of the page during callback processing after the page updates have been applied.
Definition at line 305 of file Manager.cs.
static void Anthem.Manager.RegisterClientScriptBlock | ( | Type | type, | |
String | key, | |||
String | script, | |||
Boolean | addScriptTags | |||
) | [static] |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal.
type | The type of the client script to register. | |
key | The key of the client script to register. | |
script | The client script literal to register. | |
addScriptTags | A Boolean value indicating whether to add script tags. |
A client script is uniquely identified by its key and its type. Scripts with the same key and type are considered duplicates. Only one script with a given type and key pair can be registered with the page. Attempting to register a script that is already registered does not create a duplicate of the script.
Call the IsClientScriptBlockRegistered method to determine whether a client script with a given key and type pair is already registered and avoid unnecessarily attempting to add the script.
In this overload of the RegisterClientScriptBlock method, you can indicate whether the script provided in the script parameter is wrapped with a <script> element block by using the addScriptTags parameter. Setting addScriptTags to true indicates that script tags will be added automatically.
The RegisterClientScriptBlock method adds a script block to the top of the rendered page when it is first rendered. All script blocks are rendered in the <head> of the page during callback processing after the page updates have been applied.
Definition at line 337 of file Manager.cs.
static void Anthem.Manager.RegisterClientScriptBlock | ( | String | key, | |
String | script | |||
) | [static] |
Registers the client script with the Page object and with Anthem.Manager using a key and script literal.
key | The key of the client script to register. | |
script | The client script literal to register. |
A client script is uniquely identified by its key. Scripts with the same key are considered duplicates. Only one script with a given key can be registered with the page. Attempting to register a script that is already registered does not create a duplicate of the script.
Call the Page.IsClientScriptBlockRegistered method to determine whether a client script with a given key is already registered and avoid unnecessarily attempting to add the script.
You must make sure that the script provided in the script parameter is wrapped in a <script> element block.
The RegisterClientScriptBlock method adds a script block to the top of the rendered page when it is first rendered. All script blocks are rendered in the <head> of the page during callback processing after the page updates have been applied.
Definition at line 369 of file Manager.cs.
static void Anthem.Manager.RegisterClientScriptInclude | ( | String | key, | |
String | url | |||
) | [static] |
Registers the client script include with the Page object and Anthem.Manager using a key, and a URL.
key | The key of the client script include to register. | |
url | The URL of the client script include to register. |
This overload of the RegisterClientScriptInclude method takes key and url parameters to identify the script include.
To resolve the client URL, use the ResolveClientUrl method. This method uses the context of the URL on which it is called to resolve the path.
This method adds a script block at the top of the rendered page during the initial load and in the <head> element block after each callback.
Definition at line 395 of file Manager.cs.
static void Anthem.Manager.RegisterClientScriptInclude | ( | Type | type, | |
String | key, | |||
String | url | |||
) | [static] |
Registers the client script include with the Page object and Anthem.Manager using a type, a key, and a URL.
type | The type of the client script include to register. | |
key | The key of the client script include to register. | |
url | The URL of the client script include to register. |
This overload of the RegisterClientScriptInclude method takes key and url parameters to identify the script, as well as a type parameter to specify the identification of the client script include. You specify the type based on the object that will be accessing the resource. For instance, when using a Page instance to access the resource, you specify the Page type.
To resolve the client URL, use the ResolveClientUrl method. This method uses the context of the URL on which it is called to resolve the path.
This method adds a script block at the top of the rendered page during the initial load and in the <head> element block after each callback.
Definition at line 431 of file Manager.cs.
static void Anthem.Manager.RegisterClientScriptResource | ( | Type | type, | |
String | resourceName | |||
) | [static] |
Registers the client script resource with the Page object and with Anthem.Manager using a type and a resource name.
type | The type of the client script resource to register. | |
resourceName | The name of the client script resource to register. |
The RegisterClientScriptResource method is used when accessing compiled-in resources from assemblies through the WebResource.axd HTTP handler. The RegisterClientScriptResource method registers the script with the Page object and prevents duplicate scripts. This method wraps the contents of the resource URL with a <script> element block.
Definition at line 455 of file Manager.cs.
static void Anthem.Manager.RegisterPageScriptBlock | ( | string | key, | |
string | script | |||
) | [static] |
Registers the client script with Anthem.Manager using a key and a script literal.
key | The key of the client script to register. | |
script | The client script literal to register. |
A client script is uniquely identified by its key. Scripts with the same key are considered duplicates. Only one script with a given key can be registered with Anthem.Manager. Attempting to register a script that is already registered does not create a duplicate of the script.
The script block added by the RegisterPageScriptBlock can be wrapped with a <script> element block, though this is not required.
The script block added by RegisterPageScriptBlock will only be rendered by Anthem.Manager during callback processing. If you want to render the script during the initial load use RegisterClientScriptBlock or RegisterStartupScript.
The script block added by RegisterPageScriptBlock will be rendered in the <head> element block after the page updates have been applied.
Definition at line 485 of file Manager.cs.
Referenced by Anthem.Manager.RegisterClientScriptBlock(), Anthem.Manager.RegisterClientScriptInclude(), Anthem.Manager.RegisterClientScriptResource(), and Anthem.Manager.RegisterStartupScript().
static void Anthem.Manager.RegisterStartupScript | ( | Type | type, | |
String | key, | |||
String | script | |||
) | [static] |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal.
type | The type of the client script to register. | |
key | The key of the client script to register. | |
script | The client script literal to register. |
A client script is uniquely identified by its key and its type. Scripts with the same key and type are considered duplicates. Only one script with a given type and key pair can be registered with the page. Attempting to register a script that is already registered does not create a duplicate of the script.
Call the Page.IsClientScriptBlockRegistered method to determine whether a client script with a given key and type pair is already registered and avoid unnecessarily attempting to add the script.
In this overload of the RegisterStartupScript method, you must make sure that the script provided in the script parameter is wrapped in a <script> element block.
The script block added by the RegisterStartupScript method executes when the page finishes loading but before the page's OnLoad event is raised. All script blocks are rendered in the <head> of the page during callback processing after the page updates have been applied.
Definition at line 515 of file Manager.cs.
static void Anthem.Manager.RegisterStartupScript | ( | Type | type, | |
String | key, | |||
String | script, | |||
Boolean | addScriptTags | |||
) | [static] |
Registers the client script with the Page object and with Anthem.Manager using a type, key, and script literal.
type | The type of the client script to register. | |
key | The key of the client script to register. | |
script | The client script literal to register. | |
addScriptTags | A Boolean value indicating whether to add script tags. |
A client script is uniquely identified by its key and its type. Scripts with the same key and type are considered duplicates. Only one script with a given type and key pair can be registered with the page. Attempting to register a script that is already registered does not create a duplicate of the script.
Call the Page.IsClientScriptBlockRegistered method to determine whether a client script with a given key and type pair is already registered and avoid unnecessarily attempting to add the script.
In this overload of the RegisterStartupScript method, you can indicate whether the script provided in the script parameter is wrapped with a <script> element block by using the addScriptTags parameter. Setting addScriptTags to true indicates that script tags will be added automatically.
The script block added by the RegisterStartupScript method executes when the page finishes loading but before the page's OnLoad event is raised. All script blocks are rendered in the <head> of the page during callback processing after the page updates have been applied.
Definition at line 547 of file Manager.cs.
static void Anthem.Manager.RegisterStartupScript | ( | String | key, | |
String | script | |||
) | [static] |
Registers the client script with the Page object and with Anthem.Manager using a key, and script literal.
key | The key of the client script to register. | |
script | The client script literal to register. |
A client script is uniquely identified by its key. Scripts with the same key are considered duplicates. Only one script with a given key can be registered with the page. Attempting to register a script that is already registered does not create a duplicate of the script.
Call the Page.IsClientScriptBlockRegistered method to determine whether a client script with a given key is already registered and avoid unnecessarily attempting to add the script.
You must make sure that the script provided in the script parameter is wrapped in a <script> element block.
The script block added by the RegisterStartupScript method executes when the page finishes loading but before the page's OnLoad event is raised. All script blocks are rendered in the <head> of the page during callback processing after the page updates have been applied.
Definition at line 579 of file Manager.cs.
static void Anthem.Manager.SetControlVisible | ( | StateBag | viewState, | |
bool | value | |||
) | [static] |
static void Anthem.Manager.WriteBeginControlMarker | ( | HtmlTextWriter | writer, | |
string | parentTagName, | |||
Control | control | |||
) | [static] |
This method needs to be called by custom controls that want their innerHTML to be automatically updated on the client pages during call backs. Call this at the top of the Render override. The parentTagName argument should be "div" or "span" depending on the type of control. It's this parent element that actually gets its innerHTML updated after call backs.
writer | ||
parentTagName | ||
control |
Definition at line 607 of file Manager.cs.
static void Anthem.Manager.WriteEndControlMarker | ( | HtmlTextWriter | writer, | |
string | parentTagName, | |||
Control | control | |||
) | [static] |
This method needs to be called by custom controls that want their innerHTML to be automatically updated on the client pages during call backs. Call this at the bottom of the Render override.
writer | ||
parentTagName | ||
control |
Definition at line 627 of file Manager.cs.
static void Anthem.Manager.WriteResult | ( | HttpResponse | resp, | |
object | val, | |||
string | error | |||
) | [static] |
static void Anthem.Manager.WriteValue | ( | StringBuilder | sb, | |
object | val | |||
) | [static] |
Writes the val to sb in a format that can be interpreted by Anthem.js on the client.
Definition at line 663 of file Manager.cs.
[Anthem.Method] void Anthem.Manager.FireEvent | ( | ) |
This is an empty method used as the target for the Anthem_FireEvent function. That function sets the __EVENTTARGET to the desired ID which causes the appropriate event to fire on the server so nothing needs to be done here.
Definition at line 1151 of file Manager.cs.
static void Anthem.Manager.AddCallBacks | ( | Control | control, | |
bool | enabledDuringCallBack, | |||
string | textDuringCallBack, | |||
string | preCallBackFunction, | |||
string | postCallBackFunction, | |||
string | callBackCancelledFunction | |||
) | [static] |
Add generic callbacks events to all the child controls in the container. This is used by template controls (eg. DataGrid).
control | The container control. | |
enabledDuringCallBack | true if the control should be enabled on the client during a callback. | |
textDuringCallBack | The text to display during a callback. | |
preCallBackFunction | The javascript function to execute before starting the callback. | |
postCallBackFunction | The javascript function to execute after the callback response is received. | |
callBackCancelledFunction | The javascript function to execute if the callback is cancelled by the pre-callback function. |
Definition at line 1174 of file Manager.cs.
string Anthem.Manager.CallBackID [static, get] |
string Anthem.Manager.CallBackMethod [static, get] |
string Anthem.Manager.CallBackType [static, get] |
A string value which indicates whether the callback is being made using XMLHttpRequest or a hidden IFRAME.
Definition at line 61 of file Manager.cs.
bool Anthem.Manager.IncludePageScripts [static, get, set] |
When true, Anthem.Manager will include all page level scripts in the callback response. Use this if you add or show 3rd party controls during the callback that add or change client scripts in the page.
Definition at line 75 of file Manager.cs.
bool Anthem.Manager.IsCallBack [static, get] |
Returns true if the current POST is a callback.
Definition at line 98 of file Manager.cs.
Referenced by Anthem.Manager.WriteBeginControlMarker(), and Anthem.Manager.WriteEndControlMarker().