protected void btnCheckClient_Click(object sender, EventArgs e) { string clientNo = txtClientNo.Text.ToString(); var client = XMLReader.ClientXMLReader().ClientList.Where(item => item.ClientNo == clientNo).SingleOrDefault(); if (client != null) { txtClientName.Text = client.ClientName; txtAccNo.Text = client.AccountNumber; } }