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

[LocalizableAttribute(true)] public: virtual property String^ Text { String^ get (); void set (String^ value); }
CheckBoxField の各チェック ボックスの横に表示されるキャプション。既定値は空の文字列 ("") です。

Text プロパティを使用すると、CheckBoxField オブジェクトの各チェック ボックスの横にキャプションを表示できます。Text プロパティに空の文字列を設定した場合、キャプションは表示されません。
![]() |
---|
このプロパティの値は、設定時に、デザイナ ツールを使用してリソース ファイルに自動的に保存できます。詳細については、LocalizableAttribute、ASP.NET のグローバリゼーションおよびローカリゼーション の各トピックを参照してください。

次のコード例では、Text プロパティを使用して、GridView コントロールの CheckBoxField オブジェクトのチェック ボックスにキャプションを指定する方法を示します。
<%@ Page language="VB" %> <html> <body> <form runat="server"> <h3>CheckBoxField Example</h3> <asp:gridview id="AuthorsGridView" datasourceid="AuthorsSqlDataSource" autogeneratecolumns="False" runat="server"> <columns> <asp:boundfield datafield="au_lname" headertext="Last Name"/> <asp:checkboxfield datafield="contract" text="Contract" headertext="Contract"/> </columns> </asp:gridview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Pubs sample database. --> <asp:sqldatasource id="AuthorsSqlDataSource" selectcommand="SELECT [au_lname], [au_fname], [address], [city], [state], [zip], [contract] FROM [authors]" connectionstring="server=localhost;database=pubs;integrated security=SSPI" runat="server"> </asp:sqldatasource> </form> </body> </html>
<%@ Page language="C#" %> <html> <body> <form runat="server"> <h3>CheckBoxField Example</h3> <asp:gridview id="AuthorsGridView" datasourceid="AuthorsSqlDataSource" autogeneratecolumns="False" runat="server"> <columns> <asp:boundfield datafield="au_lname" headertext="Last Name"/> <asp:checkboxfield datafield="contract" text="Contract" headertext="Contract"/> </columns> </asp:gridview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Pubs sample database. --> <asp:sqldatasource id="AuthorsSqlDataSource" selectcommand="SELECT [au_lname], [au_fname], [address], [city], [state], [zip], [contract] FROM [authors]" connectionstring="server=localhost;database=pubs;integrated security=SSPI" runat="server"> </asp:sqldatasource> </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に収録されているすべての辞書からCheckBoxField.Text プロパティを検索する場合は、下記のリンクをクリックしてください。

- CheckBoxField.Text プロパティのページへのリンク