Share via


ValidationSummary.ShowMessageBox プロパティ

定義

検証の概要をメッセージ ボックスに表示するかどうかを示す値を取得または設定します。

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

プロパティ値

検証の概要をメッセージ ボックスに表示する場合は true。それ以外の場合は false。 既定値は、false です。

属性

次のコード例では、 プロパティと ShowSummary プロパティを使用ShowMessageBoxして、検証の概要がメッセージ ボックスにのみ表示されるように指定する方法を示します。


<asp:ValidationSummary 
     id="valSum" 
     DisplayMode="BulletList"
     ShowMessageBox="true"
     ShowSummary="false" 
     HeaderText="You must enter a value in the following fields:"
     Font-Names="verdana" 
     Font-Size="12"
     runat="server"/>

<asp:ValidationSummary 
     id="valSum" 
     DisplayMode="BulletList"
     ShowMessageBox="true"
     ShowSummary="false" 
     HeaderText="You must enter a value in the following fields:"
     Font-Names="verdana" 
     Font-Size="12"
     runat="server"/>

注釈

このプロパティは、 プロパティに加えて使用して、 ShowSummary 検証の概要を表示する場所を制御できます。 このプロパティと EnableClientScript が両方とも に true設定されている場合、検証の概要がメッセージ ボックスに表示されます。 が にfalse設定されている場合EnableClientScript、このプロパティは無効です。

注意

プロパティと ShowSummary プロパティのShowMessageBox両方が にtrue設定されている場合、検証の概要はメッセージ ボックスと Web ページの両方に表示されます。

適用対象

こちらもご覧ください