ScriptManager.RegisterExpandoAttribute 메서드

정의

지정된 컨트롤의 사용자 지정(expando) 특성으로 컨트롤에 이름/값 쌍 ScriptManager 을 등록합니다.

public:
 static void RegisterExpandoAttribute(System::Web::UI::Control ^ control, System::String ^ controlId, System::String ^ attributeName, System::String ^ attributeValue, bool encode);
public static void RegisterExpandoAttribute(System.Web.UI.Control control, string controlId, string attributeName, string attributeValue, bool encode);
static member RegisterExpandoAttribute : System.Web.UI.Control * string * string * string * bool -> unit
Public Shared Sub RegisterExpandoAttribute (control As Control, controlId As String, attributeName As String, attributeValue As String, encode As Boolean)

매개 변수

control
Control

expando 특성을 등록하는 컨트롤입니다.

controlId
String

페이지의 사용자 지정 특성이 들어 있는 컨트롤입니다.

attributeName
String

등록할 사용자 지정 특성의 이름입니다.

attributeValue
String

사용자 지정 특성의 값입니다.

encode
Boolean

true등록 중인 사용자 지정 특성을 인코딩하려면 다음을 실행합니다. 그렇지 않으면 . false

예외

controlnull입니다.

control 이 페이지의 컨트롤 트리에 없습니다.

-또는-

controlIdnull입니다.

-또는-

controlId 가 비어 있습니다.

-또는-

attributeNamenull입니다.

-또는-

attributeName 가 비어 있습니다.

-또는-

attributeName 가 이미 등록되어 있습니다.

설명

RegisterExpandoAttribute 메서드를 사용하여 부분 페이지 렌더링과 호환되고 Microsoft Ajax 라이브러리 종속성이 없는 컨트롤에 대한 사용자 지정(expando) 속성을 등록합니다.

메서드는 RegisterExpandoAttribute 지정된 컨트롤에 대한 사용자 지정 특성으로 이름/값 쌍을 등록합니다. 렌더링된 컨트롤의 태그에 대한 XHTML 호환성을 유지하기 위해 이 속성은 ECMAScript(JavaScript)에서 동적으로 설정됩니다. encode 동적 속성 값의 문자를 이스케이프해야 하는 경우로 설정합니다true.

동적 속성을 추가할 컨트롤을 찾을 수 없으면 스크립트 오류가 발생합니다.

적용 대상

추가 정보