0
郵便番号検索を行う既存のWebサービスを使用しています。リストボックスに値:「ID」、「テキスト」、「ハイライト」、「カーソル」、 「説明」、「次へ」。ID &次の paramの特定の文字列値にアクセスして、後で検証する必要があります。リストボックスをクリックすると、特定のデータを保存しておき、必要な2つの情報にアクセスします。リストボックスの特定の行の情報にアクセスして後で使用するにはどうすればよいですか?リストに格納された特定の情報を取得する方法
try
{
int myMaxResultValue = (int)nud_MaxResults.Value;
int myMaxSuggestValue = (int)nud_MaxSuggestions.Value;
findResults = objBvSoapClient.CapturePlus_Interactive_Find_v2_10("Dak4-KZ62-AAdd87-X55", txt_Search.Text, txt_LastId.Text, cb_SearchFor.Text, text_Country.Text, text_LanguagePreference.Text, myMaxResultValue, myMaxSuggestValue);
if (txt_Search.Text.Length <= 2)// if less than two letters are entered nothing is displayed on the list.
{
ls_Output.Items.Clear();// Clear LstBox
ls_Output.Items.Add(String.Format(allDetails, "ID", "Text", "Highlight", "Cursor", "Description", "Next"));
MessageBox.Show("Please enter more than 2 Chars!!");
}
else if (txt_Search.Text.Length >= 3)// if greater than or equal to 3 letters in the search box continue search.
{
// Get Results and store in given array.
foreach (var items in findResults)
{ //Loop through our collection of found results and change resulting value.
ls_Output.Items.Add(String.Format(allDetails, items.Id, items.Text.ToString(), items.Highlight, items.Cursor, items.Description, items.Next));
}
}
}
のようにアクセスすることができますなぜあなたは、クラスPostCodeSearchResultのオブジェクトを使用していませんか? –
@devil_coder mycuレントサービスからアドレスを取得済みです。リストボックスの特定の行の情報にアクセスし、後でそれを使用する方法が見つかりました – whatdoyouNeedFromMe
しようとしましたint index = listBox1.FindString検索文字列); ? –