다음을 통해 공유


ImportCatalogPart.PartImportErrorLabelText 속성

정의

가져오는 중 오류가 발생할 경우 표시되는 오류 메시지를 가져오거나 설정합니다.

public:
 property System::String ^ PartImportErrorLabelText { System::String ^ get(); void set(System::String ^ value); };
public string PartImportErrorLabelText { get; set; }
member this.PartImportErrorLabelText : string with get, set
Public Property PartImportErrorLabelText As String

속성 값

레이블 텍스트가 포함된 문자열입니다. 기본값은 .NET Framework에서 제공하는 culture별 메시지입니다.

예제

다음 코드 예제를 사용 PartImportErrorLabelText 하는 방법에 설명 합니다 선언적이 고 프로그래밍 방식으로 속성입니다. 예제를 실행하는 데 필요한 전체 코드 및 지침은 클래스 개요의 예제 섹션을 ImportCatalogPart 참조하세요.

다음 코드 섹션에서는 속성 값이 컨트롤에 PartImportErrorLabelText 대해 선언적으로 설정되어 있는지 확인합니다.

<asp:CatalogZone ID="CatalogZone1" runat="server">
  <ZoneTemplate>
    <asp:ImportCatalogPart ID="ImportCatalogPart1" 
      runat="server" 
      Title="My ImportCatalogPart" 
      OnPreRender="ImportCatalogPart1_PreRender"
      BrowseHelpText="Type a path or browse to find a control's 
        description file." 
      UploadButtonText="Upload Description File" 
      UploadHelpText="Click the button to upload the description 
        file."
      ImportedPartLabelText="My User Information WebPart" 
      PartImportErrorLabelText="An error occurred while trying 
        to import a description file."  />
  </ZoneTemplate>
</asp:CatalogZone>
<asp:CatalogZone ID="CatalogZone1" runat="server">
  <ZoneTemplate>
    <asp:ImportCatalogPart ID="ImportCatalogPart1" 
      runat="server" 
      Title="My ImportCatalogPart" 
      OnPreRender="ImportCatalogPart1_PreRender"
      BrowseHelpText="Type a path or browse to find a control's 
        description file." 
      UploadButtonText="Upload Description File" 
      UploadHelpText="Click the button to upload the description 
        file."
      ImportedPartLabelText="My User Information WebPart" 
      PartImportErrorLabelText="An error occurred while trying 
        to import a description file."  />
  </ZoneTemplate>
</asp:CatalogZone>

이 코드 섹션에서는 속성 값이 PartImportErrorLabelText 프로그래밍 방식으로 할당됩니다.

protected void Button1_Click(object sender, EventArgs e)
{
  ImportCatalogPart1.Title = "Import Server Controls";
  ImportCatalogPart1.BrowseHelpText = "Enter the path to a "
    + "description file.";
  ImportCatalogPart1.UploadButtonText = "Upload Description";
  ImportCatalogPart1.UploadHelpText = "Upload a description file.";
  ImportCatalogPart1.ImportedPartLabelText = "Imported Controls";
  ImportCatalogPart1.PartImportErrorLabelText = "An error occurred " 
    + "during the import process.";

}
Protected Sub Button1_Click(ByVal sender As Object, _
  ByVal e As EventArgs)
    ImportCatalogPart1.Title = "Import Server Controls"
    ImportCatalogPart1.BrowseHelpText = "Enter the path to a " _
      & "description file."
    ImportCatalogPart1.UploadButtonText = "Upload Description"
    ImportCatalogPart1.UploadHelpText = "Upload a description file."
    ImportCatalogPart1.ImportedPartLabelText = "Imported Controls"
    ImportCatalogPart1.PartImportErrorLabelText = "An error occurred " _
      & "during the import process."
End Sub

브라우저에서 페이지를 로드할 때 표시 모드 드롭다운 목록 컨트롤을 사용하여 카탈로그 모드 를 선택하고 페이지를 카탈로그 모드로 전환할 수 있습니다. 카탈로그 모드의 페이지와 설명 파일이 업로드되면 컨트롤의 UI(사용자 인터페이스)에 표시되는 다양한 텍스트 문자열을 ImportCatalogPart 확인합니다. 설명 파일 업로드 단추를 클릭하면 속성의 텍스트를 포함하여 UI의 여러 속성에 대한 텍스트가 PartImportErrorLabelText 변경됩니다.

설명

속성은 PartImportErrorLabelText 페이지에서 설명 파일을 가져오려고 시도하는 동안 일부 문제 또는 오류가 발생하는 경우 사용자에게 알리는 데 유용합니다.

적용 대상

추가 정보