Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework
 RegisterExpandoAttribute Method (St...
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
ClientScriptManager..::.RegisterExpandoAttribute Method (String, String, String)

Registers a name/value pair as a custom (expando) attribute of the specified control given a control ID, attribute name, and attribute value.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

Visual Basic (Declaration)
Public Sub RegisterExpandoAttribute ( _
    controlId As String, _
    attributeName As String, _
    attributeValue As String _
)
Visual Basic (Usage)
Dim instance As ClientScriptManager
Dim controlId As String
Dim attributeName As String
Dim attributeValue As String

instance.RegisterExpandoAttribute(controlId, _
    attributeName, attributeValue)
C#
public void RegisterExpandoAttribute(
    string controlId,
    string attributeName,
    string attributeValue
)
Visual C++
public:
void RegisterExpandoAttribute(
    String^ controlId, 
    String^ attributeName, 
    String^ attributeValue
)
J#
public void RegisterExpandoAttribute(
    String controlId,
    String attributeName,
    String attributeValue
)
JScript
public function RegisterExpandoAttribute(
    controlId : String, 
    attributeName : String, 
    attributeValue : String
)

Parameters

controlId
Type: System..::.String

The Control on the page that contains the custom attribute.

attributeName
Type: System..::.String

The name of the custom attribute to register.

attributeValue
Type: System..::.String

The value of the custom attribute.

The RegisterExpandoAttribute method registers a name/value pair as a custom (expando) attribute on the specified Control. The expando attribute is set dynamically from JavaScript to preserve XHTML compatibility for the rendered control's markup. Quotes and backslashes in the custom (expando) attribute's values are escaped. If you do not want to escape quotes and backslashes, call the RegisterExpandoAttribute overload method and set the encode parameter to false.

If the expando attribute is not found or the control to add the expando attribute to is not found, the client script is still emitted, but it will not affect the control.

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content      
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker