you can read file and match the string in the data of .txt file
here is simple example
private int GetLinesNoFromFile(string FileNameWithPath,string searchString)
{
string[] bt = null;
if (System.IO.File.Exists(FileNameWithPath))
{
bt = System.IO.File.ReadAllLines(FileNameWithPath);
}
for (int i = 0; i < bt.Length; i++)
{
string str = bt[i].ToString();
if (str.Contains(searchString))
return i;
}
return -1;
}