Class ScriptSettings

Sets script object properties for a control on the page

Inheritance
System.Object
ScriptSettings
Implements
System.Web.UI.IAttributeAccessor
Namespace: EPiServer.ClientScript.WebControls
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class ScriptSettings : Control, IAttributeAccessor

Constructors

ScriptSettings()

Declaration
public ScriptSettings()

Properties

Attributes

Gets a dictionary containing script setting attributes set for this control.

Declaration
public IDictionary<string, string> Attributes { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.String>

CommonSettingsControlID

Id of a control used for common settings when traversing the settings hierachy.

Declaration
public string CommonSettingsControlID { get; set; }
Property Value
Type Description
System.String

ConfirmMessage

Sets the message used for confirm dialogs the specified string

Declaration
public string ConfirmMessage { get; set; }
Property Value
Type Description
System.String

Description

Sets the client side description setting to the specified string

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String

Items

A List containing custom script properties

Declaration
public ScriptSettingItemCollection Items { get; }
Property Value
Type Description
ScriptSettingItemCollection

Name

Sets the client side name setting to the specified string

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

TargetControlClientID

Client Side Id of the control for which the supplied settings are registered for.

Declaration
public string TargetControlClientID { get; set; }
Property Value
Type Description
System.String

TargetControlID

Id of the control for which the supplied settings are registered for.

Declaration
public string TargetControlID { get; set; }
Property Value
Type Description
System.String

Methods

GetAttribute(String)

Gets the value of an script setting property.

Declaration
public string GetAttribute(string key)
Parameters
Type Name Description
System.String key

A System.String that represents the name of the server control attribute.

Returns
Type Description
System.String

The value of the specified attribute or System.String.Empty if the attribute is not set.

LoadViewState(Object)

Restores the control state from view state information

Declaration
protected override void LoadViewState(object savedState)
Parameters
Type Name Description
System.Object savedState

State information

OnPreRender(EventArgs)

Adds property items to the ScriptManager

Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type Name Description
System.EventArgs e

SaveViewState()

Get view state changes that have occured since last postback.

Declaration
protected override object SaveViewState()
Returns
Type Description
System.Object

The controls current view state

SetAttribute(String, String)

Sets an script setting property and its value for the control.

Declaration
public void SetAttribute(string key, string value)
Parameters
Type Name Description
System.String key

The name of the attribute to be set.

System.String value

The value assigned to the attribute.

TrackViewState()

Starts tracking of the control changes in view state.

Declaration
protected override void TrackViewState()

Implements

System.Web.UI.IAttributeAccessor

Extension Methods