ValidationSummary.BackLabel Property

Definition

Gets or sets a string from the validation summary that links to the form that contains an error. The default value is Empty. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 property System::String ^ BackLabel { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string BackLabel { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.BackLabel : string with get, set
Public Property BackLabel As String

Property Value

A string from the validation summary that links to the form that contains an error.

Attributes

Examples

The following code example demonstrates how to use the BackLabel property to specify the link text in a ValidationSummary to return to the form with the error.

private void OnCmdClick(Object sender, EventArgs e)
{
    if (Page.IsValid)
        ActiveForm = Form2;
    else
    {
        ValSummary.BackLabel = "Return to Form";
        ActiveForm = Form3;
    }
}
Private Sub OnCmdClick(ByVal sender As Object, ByVal e As EventArgs)
    If Page.IsValid Then
        ActiveForm = Form2
    Else
        ValSummary.BackLabel = "Return to Form"
        ActiveForm = Form3
    End If
End Sub

Remarks

When an error occurs during the rendering of a form, the validation process uses the text in the BackLabel property as the string that is displayed on the validation summary page.

Applies to

See also