ListItemCollection.FindByText メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ListItemCollection.FindByText メソッドの意味・解説 

ListItemCollection.FindByText メソッド

指定したテキスト格納している Text プロパティを持つ ListItem をコレクションで検索ます。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Function FindByText ( _
    text As String _
) As ListItem
Dim instance As ListItemCollection
Dim text As String
Dim returnValue As ListItem

returnValue = instance.FindByText(text)
public ListItem FindByText (
    string text
)
public:
ListItem^ FindByText (
    String^ text
)
public ListItem FindByText (
    String text
)
public function FindByText (
    text : String
) : ListItem

パラメータ

text

検索対象テキスト

戻り値
text パラメータ指定されテキスト格納している ListItem

解説解説
使用例使用例
Dim myListItem As ListItem = SearchType.SelectedItem
Dim crItem As ListItem 
Dim searchText As String
  = TextBox1.Text
If(myListItem.Value = "Name") Then
    If(TextBox1.Text <> ""
 ) Then        
        Dim searchSubfirst As String
 = searchText.Substring(0,1)
        Dim searchSubsecond As String
 = searchText.Substring(1)
        searchText = searchSubfirst.ToUpper()+searchSubsecond.ToLower()
        ' Search by country or region name.                       
        crItem = ItemCollection.FindByText(searchText)    
    End If            
Else
    'Search by country or region code.
    crItem = ItemCollection.FindByValue(searchText.ToUpper())
End If

Dim str As String  = "Search
 is successful. Match is Found.<br>"
str = str & "The results for search string
 '" & searchText & "' are:<br>"
str = str & "the country or region code is: "
 & crItem.Value & "<br>"
str = str & "the country or region name is: "
 & crItem.Text
' Add the string to the label.
Label1.Text = str
                  
ListItem myListItem = SearchType.SelectedItem;
ListItem crItem = null;
String searchText = TextBox1.Text;
if(myListItem.Value == "Name")
{
    if(TextBox1.Text != "")
    {
        String searchSubfir = searchText.Substring(0,1);
        String searchSubsec = searchText.Substring(1);
        searchText = searchSubfir.ToUpper()+searchSubsec.ToLower();

        // Search by country or region name.
        crItem = ItemCollection.FindByText(searchText);
    }
}
else
{
    // Search by country or region code.
    crItem = ItemCollection.FindByValue(searchText.ToUpper());
}

String str = "Search is successful. Match is Found.<br>";
str =str + "The results for search string
 '" + searchText + "' are:<br>";
str = str + "the country or region code is " + crItem.Value + "<br>";
str = str + "the country or region name is " + crItem.Text;

// Add the string to the label.
Label1.Text = str;

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ListItemCollection クラス
ListItemCollection メンバ
System.Web.UI.WebControls 名前空間
FindByValue
ListItem クラス
ListItem.Text プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からListItemCollection.FindByText メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からListItemCollection.FindByText メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からListItemCollection.FindByText メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ListItemCollection.FindByText メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ListItemCollection.FindByText メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS