Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

Skip Navigation Links.
ScriptManager Class
ScriptManager Constructor
AllowCustomErrorsRedirect Property
AsyncPostBackError Event
AsyncPostBackErrorMessage Property
AsyncPostBackSourceElementID Property
AsyncPostBackTimeout Property
AuthenticationService Property
EnablePageMethods Property
EnablePartialRendering Property
EnableScriptGlobalization Property
EnableScriptLocalization Property
GetCurrent Method (page)
IsDebuggingEnabled Property
IsInAsyncPostBack Property
LoadPostData Method (postDataKey, postCollection)
LoadScriptsBeforeUI Property
OnAsyncPostBackError Method (e)
OnInit Method (e)
OnPreRender Method (e)
OnResolveScriptReference Method (e)
ProfileService Property
RaisePostDataChangedEvent Method
RegisterArrayDeclaration Method
RegisterArrayDeclaration Method (control, arrayName, arrayValue)
RegisterArrayDeclaration Method (page, arrayName, arrayValue)
RegisterAsyncPostBackControl Method (control)
RegisterClientScriptBlock Method
RegisterClientScriptBlock Method (control, type, key, script, addScriptTags)
RegisterClientScriptBlock Method (page, type, key, script, addScriptTags)
RegisterClientScriptInclude Method
RegisterClientScriptInclude Method (control, type, key, url)
RegisterClientScriptInclude Method (page, type, key, url)
RegisterClientScriptResource Method
RegisterClientScriptResource Method (control, type, resourceName)
RegisterClientScriptResource Method (page, type, resourceName)
RegisterDataItem Method
RegisterDataItem Method (control, dataItem)
RegisterDataItem Method (control, dataItem, isJsonSerialized)
RegisterDispose Method (control, disposeScript)
RegisterExpandoAttribute Method (control, controlId, attributeName, attributeValue, encode)
RegisterExtenderControl Method (extenderControl, targetControl)
RegisterHiddenField Method
RegisterHiddenField Method (control, hiddenFieldName, hiddenFieldInitialValue)
RegisterHiddenField Method (page, hiddenFieldName, hiddenFieldInitialValue)
RegisterOnSubmitStatement Method
RegisterOnSubmitStatement Method (control, type, key, script)
RegisterOnSubmitStatement Method (page, type, key, script)
RegisterPostBackControl Method (control)
RegisterScriptControl Method (scriptControl)
RegisterScriptDescriptors Method
RegisterScriptDescriptors Method (extenderControl)
RegisterScriptDescriptors Method (scriptControl)
RegisterStartupScript Method
RegisterStartupScript Method (control, type, key, script, addScriptTags)
RegisterStartupScript Method (page, type, key, script, addScriptTags)
Render Method (writer)
ResolveScriptReference Event
ScriptMode Property
ScriptPath Property
Scripts Property
Services Property
SetFocus Method
SetFocus Method (clientID)
SetFocus Method (control)
SupportsPartialRendering Property
Visible Property

RegisterExpandoAttribute Method (control, controlId, attributeName, attributeValue, encode)

Registers a name/value pair with the ScriptManager control as a custom (expando) attribute of a specified control.

Syntax

CSharp

public static void RegisterExpandoAttribute (
	Control control,
	string controlId,
	string attributeName,
	string attributeValue,
	bool encode
)

VisualBasic

Public Shared Sub RegisterExpandoAttribute ( _
	control As Control, _
	controlId As String, _
	attributeName As String, _
	attributeValue As String, _
	encode As Boolean _
)

ManagedCPlusPlus

public:
static void RegisterExpandoAttribute (
	Control^ control, 
	String^ controlId, 
	String^ attributeName, 
	String^ attributeValue, 
	bool encode
)

JSharp

public static void RegisterExpandoAttribute (
	Control control,
	String controlId,
	String attributeName,
	String attributeValue,
	boolean encode
)

Parameters

control (Control)

The control that is registering the expando attribute.

controlId (String)

The Control instance that contains the custom attribute on the page.

attributeName (String)

The name of the custom attribute to register.

attributeValue (String)

The value of the custom attribute to register.

encode (Boolean)

A Boolean value that indicates whether to encode the custom attribute that is being registered.

Remarks

The RegisterExpandoAttribute(Control, String, String, String, Boolean) method is used to register a custom (expando) property for a control that is compatible with partial-page rendering and that has no Microsoft AJAX Library dependencies. 

The RegisterExpandoAttribute(Control, String, String, String, Boolean) method registers a name/value pair as a custom (or expando) attribute on the specified control. The property is set dynamically from ECMAScript (JavaScript) to preserve XHTML compatibility for the rendered control's markup. Set the encode parameter to true if you need to escape any characters in the dynamic property's value.

If the control to which the dynamic property will be added is not found, a script error occurs.

Exceptions

ExceptionCondition
ArgumentNullException

control is null.

ArgumentException

control is not in the page's control tree.

- or -

controlId is null.

- or -

controlId is empty.

- or -

attributeName is null.

- or -

attributeName is empty.

- or -

attributeName is already registered.

Assembly: System.Web.Extensions (Module: System.Web.Extensions)