Hi,
Use a check condition before using the foreach loop in the code.
if (table.Rows.Count > 0)
{
foreach (DataRow row in table.Rows)
{
string age = row["m_age"].ToString();
txtage.Text = "";
txtage.Text = age;
}
}
Cross verify whether the input values are passing properly or not to the stored procedure.
Thanks,
Sisir Patro