HtmlTextWriter.WriteEncodedText(String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
요청 디바이스에 대해 지정된 텍스트를 인코딩한 다음 출력 스트림에 씁니다.
public:
virtual void WriteEncodedText(System::String ^ text);
public virtual void WriteEncodedText(string text);
abstract member WriteEncodedText : string -> unit
override this.WriteEncodedText : string -> unit
Public Overridable Sub WriteEncodedText (text As String)
매개 변수
- text
- String
출력 스트림을 인코딩하고 쓸 텍스트 문자열입니다.
예외
text은 null입니다.
예제
다음 코드 예제에서는 인코딩된 태그 WriteEncodedText 를 출력 스트림에 쓰기 위해 메서드를 사용 <custID> & <invoice#> 하는 방법을 보여 줍니다. 메서드는 WriteBreak 을 씁니다.<br />
// Assign a value to a string variable,
// encode it, and write it to a page.
colHeads = "<custID> & <invoice#>";
writer.WriteEncodedText(colHeads);
writer.WriteBreak();
' Assign a value to a string variable,
' encode it, and write it to a page.
colHeads = "<custID> & <invoice#>"
writer.WriteEncodedText(colHeads)
writer.WriteBreak()
설명
문자열에 WriteEncodedText 꺾쇠 괄호(< 또는) 또는 >앰퍼샌드(>)가 포함된 경우 이 메서드를 사용합니다.
이 메서드는 WriteEncodedText 메서드를 HtmlEncode 사용하여 인코딩을 수행하고 유니코드 문자를 00A0 .로 변환합니다.