Share via


ValidationSummary.BackLabel プロパティ

定義

エラーが発生したフォームへのリンクを示すために検証要約内で使用する文字列を取得または設定します。 既定値は Empty です。 この API は、互換性のために残されています。 ASP.NET モバイル アプリケーションを開発する方法については、「ASP.NET を使用した Mobile Apps & サイト」を参照してください。

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

プロパティ値

エラーが発生したフォームへのリンクを示すために検証要約内で使用する文字列。

属性

次のコード例では、 プロパティを BackLabel 使用して 内 ValidationSummary のリンク テキストを指定し、エラーが発生してフォームに戻る方法を示します。

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

注釈

フォームのレンダリング中にエラーが発生すると、検証プロセスでは、 プロパティのテキストが BackLabel 検証の概要ページに表示される文字列として使用されます。

適用対象

こちらもご覧ください