hi i am checking all column values if any special characters are there .it is working fine but it returns last column two times
and i want better code than below code (means it contains 4 loops so it takes more time so i want to execute less time)\
SqlDataAdapter da = new SqlDataAdapter("select * from task1", cn);
DataTable dt = new DataTable();
da.Fill(dt);
for (int i = 0; i < dt.Rows.Count; i++)
{
for (int j = 0; j < dt.Columns.Count; j++)
{
string str = dt.Rows[i][j].ToString();
string str1 = "#$%^@";
for (int k = 0; k < str1.Length; k++)
{
for (int l = 0; l < str.Length ; l++)
{
if (str1[k] == str[l])
{
Response.Write(dt.Rows[i][j].ToString());
}
}
}
}
Response.Write("<br>");
}
Thanks&Regards
LakshmiNarayana Nalluri.