ScriptManager.RegisterExpandoAttribute 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
ScriptManager 컨트롤을 사용하여 이름/값 쌍을 지정된 컨트롤의 사용자 지정(expando) 특성으로 등록합니다.
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)에서 동적으로 설정됩니다. true 동적 속성 값의 문자를 이스케이프해야 하는 경우로 설정합니다encode.
동적 속성을 추가할 컨트롤을 찾을 수 없으면 스크립트 오류가 발생합니다.