BaseValidator.IsValid プロパティ
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)

Dim instance As BaseValidator Dim value As Boolean value = instance.IsValid instance.IsValid = value
/** @property */ public final boolean get_IsValid () /** @property */ public final void set_IsValid (boolean value)
コントロールが検証したデータが有効である場合は true。それ以外の場合は false。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


BaseValidator.IsValid プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As BaseValidator Dim value As Boolean value = instance.IsValid instance.IsValid = value
[ThemeableAttribute(false)] public: virtual property bool IsValid { bool get () sealed; void set (bool value) sealed; }
/** @property */ public final boolean get_IsValid () /** @property */ public final void set_IsValid (boolean value)
関連付けられている入力コントロールの検証が成功した場合は true。それ以外の場合は false。既定値は true です。

ページの Page.IsValid プロパティが true に設定されるのは、そのページの各検証コントロールの IsValid プロパティも true に設定されている場合だけです。
このプロパティをテーマ別またはスタイル シート テーマ別に設定することはできません。詳細については、ThemeableAttribute、ASP.NET のテーマとスキンの概要 の各トピックを参照してください。

IsValid プロパティを使用して、関連付けられている入力コントロールの検証が成功したかどうかを確認するコード例を次に示します。
<%@ Page Language="VB" AutoEventWireup="False" %> <script runat="server"> Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SubmitButton.Click If NumberCompareValidator.IsValid And TextBoxRequiredValidator.IsValid Then MessageLabel.Text = "Page submitted successfully." Else MessageLabel.Text = "There is an error on the page." End If End Sub </script> <html> <body> <form runat="server"> <h3>Validator Example</h3> Enter a number from 1 to 10. <asp:textbox id="NumberTextBox" runat="server"/> <asp:rangevalidator id="NumberCompareValidator" controltovalidate="NumberTextBox" enableclientscript="False" type="Integer" display="Dynamic" errormessage="Please enter a value from 1 to 10." maximumvalue="10" minimumvalue="1" text="*" runat="server"/> <asp:requiredfieldvalidator id="TextBoxRequiredValidator" controltovalidate="NumberTextBox" enableclientscript="False" display="Dynamic" errormessage="Please enter a value." text="*" runat="server"/> <br><br> <asp:button id="SubmitButton" text="Submit" runat="server"/> <br><br> <asp:label id="MessageLabel" runat="server"/> <br><br> <asp:validationsummary id="ErrorSummary" runat="server"/> </form> </body> </html>
<%@ Page Language="C#" %> <script runat="server"> void Button_Click(Object sender, EventArgs e) { if (NumberCompareValidator.IsValid && TextBoxRequiredValidator.IsValid) { MessageLabel.Text = "Page submitted successfully."; } else { MessageLabel.Text = "There is an error on the page."; } } </script> <html> <body> <form runat="server"> <h3>Validator Example</h3> Enter a number from 1 to 10. <asp:textbox id="NumberTextBox" runat="server"/> <asp:rangevalidator id="NumberCompareValidator" controltovalidate="NumberTextBox" enableclientscript="False" type="Integer" display="Dynamic" errormessage="Please enter a value from 1 to 10." maximumvalue="10" minimumvalue="1" text="*" runat="server"/> <asp:requiredfieldvalidator id="TextBoxRequiredValidator" controltovalidate="NumberTextBox" enableclientscript="False" display="Dynamic" errormessage="Please enter a value." text="*" runat="server"/> <br><br> <asp:button id="SubmitButton" text="Submit" onclick="Button_Click" runat="server"/> <br><br> <asp:label id="MessageLabel" runat="server"/> <br><br> <asp:validationsummary id="ErrorSummary" runat="server"/> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からBaseValidator.IsValidを検索する場合は、下記のリンクをクリックしてください。

- BaseValidator.IsValidのページへのリンク