ScriptManager.RegisterExpandoAttribute 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 컨트롤의 사용자 지정(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
예외
control은 null입니다.
control 이 페이지의 컨트롤 트리에 없습니다.
-또는-
controlId은 null입니다.
-또는-
controlId 가 비어 있습니다.
-또는-
attributeName은 null입니다.
-또는-
attributeName 가 비어 있습니다.
-또는-
attributeName 가 이미 등록되어 있습니다.
설명
RegisterExpandoAttribute 메서드를 사용하여 부분 페이지 렌더링과 호환되고 Microsoft Ajax 라이브러리 종속성이 없는 컨트롤에 대한 사용자 지정(expando) 속성을 등록합니다.
메서드는 RegisterExpandoAttribute 지정된 컨트롤에 대한 사용자 지정 특성으로 이름/값 쌍을 등록합니다. 렌더링된 컨트롤의 태그에 대한 XHTML 호환성을 유지하기 위해 이 속성은 ECMAScript(JavaScript)에서 동적으로 설정됩니다.
encode 동적 속성 값의 문자를 이스케이프해야 하는 경우로 설정합니다true.
동적 속성을 추가할 컨트롤을 찾을 수 없으면 스크립트 오류가 발생합니다.