ErrorWebPart.ErrorMessage Propriedade
Definição
Obtém ou define a mensagem de erro que é exibida em uma página da Web no lugar de um controle que não pode ser adicionado com êxito à página.Gets or sets the error message that is displayed in a Web page in place of a control that could not be successfully added to the page.
public:
property System::String ^ ErrorMessage { System::String ^ get(); void set(System::String ^ value); };
public string ErrorMessage { get; set; }
member this.ErrorMessage : string with get, set
Public Property ErrorMessage As String
Valor da propriedade
Uma cadeia de caracteres que contém o texto da mensagem de erro.A string that contains the text of the error message. O valor padrão é uma mensagem de erro específica de cultura.The default value is a culture-specific error message.
Comentários
A ErrorMessage propriedade pode ser atribuída a um valor por um desenvolvedor, para que uma mensagem de erro personalizada seja exibida no ponto em que o ErrorWebPart controle é inserido em uma página.The ErrorMessage property can be assigned a value by a developer, so that a custom error message is displayed at the point where the ErrorWebPart control is inserted into a page.
Notas aos Herdeiros
Os desenvolvedores podem atribuir um valor padrão à ErrorMessage propriedade, estendendo a ErrorWebPart classe e, no ErrorWebPart(String, String, String, String) Construtor ou em um EndLoadPersonalization() método substituído, atribuindo um valor padrão à propriedade.Developers can assign a default value to the ErrorMessage property by extending the ErrorWebPart class and, in the ErrorWebPart(String, String, String, String) constructor or in an overridden EndLoadPersonalization() method, assigning a default value to the property.
Para exigir que o WebPartManager controle use um ErrorWebPart controle personalizado, você também deve herdar da WebPartManager classe e substituir seu CreateErrorWebPart(String, String, String, String, String) método.To require the WebPartManager control to use a custom ErrorWebPart control, you must also inherit from the WebPartManager class and override its CreateErrorWebPart(String, String, String, String, String) method. Nesse método, você deve atribuir o valor do parâmetro do método errorMessage à ErrorMessage Propriedade do seu ErrorWebPart controle personalizado, pois o WebPartManager controle chama esse método de vários outros locais e geralmente passa em uma mensagem de erro específica.In that method, you should assign the value of the method's errorMessage parameter to the ErrorMessage property of your custom ErrorWebPart control, because the WebPartManager control calls this method from several other places, and usually passes in a specific error message.