ImportCatalogPart.PartImportErrorLabelText Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta un messaggio di errore che viene visualizzato se si verifica un errore durante il processo di importazione.
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
Valore della proprietà
Stringa che contiene il testo dell'etichetta. Il valore predefinito è un messaggio specifico delle impostazioni cultura fornito in .NET Framework.
Esempio
Nell'esempio di codice seguente viene illustrato come usare la PartImportErrorLabelText proprietà dichiarativamente e a livello di codice. Per il codice completo e le istruzioni necessarie per eseguire l'esempio, vedere la sezione Esempio della panoramica della ImportCatalogPart classe.
Nella sezione seguente di codice si noti che il valore della PartImportErrorLabelText proprietà è impostato in modo dichiarativo per il controllo.
<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>
In questa sezione di codice viene assegnato il valore della PartImportErrorLabelText proprietà a livello di codice.
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
Quando si carica la pagina in un browser, è possibile usare il controllo elenco a discesa Modalità visualizzazione per selezionare Modalità catalogo e passare alla modalità catalogo. Con la pagina in modalità catalogo e il file di descrizione caricati, prendere nota delle varie stringhe di testo visualizzate nell'interfaccia utente per il ImportCatalogPart controllo. Se si fa clic sul pulsante Carica file descrizione , il testo per diverse proprietà nell'interfaccia utente viene modificato, incluso il testo per la PartImportErrorLabelText proprietà.
Commenti
La PartImportErrorLabelText proprietà è utile per notificare a un utente se si verifica un problema o un errore durante il tentativo della pagina di importare un file di descrizione.
Si applica a
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per