다음을 통해 공유


LoginViewDesigner.GetErrorDesignTimeHtml(Exception) 메서드

정의

오류가 발생했을 때 디자인 타임에 연결된 컨트롤을 렌더링하는 태그를 제공합니다.

protected:
 override System::String ^ GetErrorDesignTimeHtml(Exception ^ e);
protected override string GetErrorDesignTimeHtml (Exception e);
override this.GetErrorDesignTimeHtml : Exception -> string
Protected Overrides Function GetErrorDesignTimeHtml (e As Exception) As String

매개 변수

e
Exception

throw된 Exception 입니다.

반환

String

오류가 발생한 후 디자인 타임에 연결된 LoginView를 렌더링하는 데 사용되는 태그를 포함한 문자열입니다.

예제

다음 코드 예제에서는 재정의 하는 방법을 보여 줍니다.는 GetErrorDesignTimeHtml 에서 상속 된 클래스에서 메서드를 LoginViewDesigner 클래스에서 파생 된 컨트롤의 모양을 변경 하는 LoginView 디자인 타임에는 클래스입니다. 이 예제에서는 굵은 빨간색 텍스트로 렌더링 되는 오류 메시지를 포함 하는 자리 표시자에 대 한 태그를 생성 합니다.

// Generate the design-time markup for the control when an error occurs.
protected override string GetErrorDesignTimeHtml(Exception ex) 
{
    // Write the error message text in red, bold.
    string errorRendering =
        "<span style=\"font-weight:bold; color:Red; \">" +
        ex.Message + "</span>";

    return CreatePlaceHolderDesignTimeHtml(errorRendering);
} // GetErrorDesignTimeHtml
' Generate the design-time markup for the control when an error occurs.
Protected Overrides Function GetErrorDesignTimeHtml( _
    ByVal ex As Exception) As String

    ' Write the error message text in red, bold.
    Dim errorRendering As String = _
        "<span style=""font-weight:bold; color:Red; "">" & _
        ex.Message & "</span>"

    Return CreatePlaceHolderDesignTimeHtml(errorRendering)

End Function ' GetErrorDesignTimeHtml

설명

디자인 타임 오류 LoginView 형식 이름, 컨트롤 이름 및 발표 하 고 오류를 설명 하는 메시지를 포함 하는 창으로 컨트롤을 렌더링 합니다.

적용 대상

추가 정보