Share via


ImportCatalogPart.BrowseHelpText プロパティ

定義

ユーザーに、記述ファイルの場所を参照するように指示するテキスト メッセージを取得または設定します。

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

プロパティ値

メッセージのテキストを含む文字列。 既定値は、.NET Framework が提供する、カルチャ固有の文字列です。

次のコード例では、 プロパティを宣言的およびプログラム的に使用 BrowseHelpText する方法を示します。 この例を実行するために必要な完全なコードと手順については、クラスの概要の「例」セクションを ImportCatalogPart 参照してください。

コードの次のセクションでは、プロパティ値がコントロールに対して BrowseHelpText 宣言的に設定されていることに注意してください。

<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>

コードのこのセクションでは、 BrowseHelpText プロパティ値がプログラムによって割り当てられます。

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 内のいくつかのプロパティのテキスト (プロパティのテキスト BrowseHelpText を含む) が変更されます。

注釈

プロパティを BrowseHelpText 使用すると、インポートされたコントロールを追加するプロセスで最初に行う必要がある操作の簡単な概要をユーザーに提供します。パスを入力するか、ファイルを参照することで、説明ファイルの場所を指定します。 このプロパティのカスタム値を指定する一般的な理由は、ユーザーが参照して説明ファイルを検索する必要がある特定のネットワーク共有など、ユーザーに特別な指示がある場合です。

適用対象

こちらもご覧ください