hi all
i am using a wcf service
and my code in service.svc.cs is
public DataSet Getdata()
{
conn = new sqlConnection(ConnStr);
conn.Open();
sqlCommand cmd = new sqlCommand("SELECT * FROM table1", con)
sqlDataAdapter sda = new sqlDataAdapter(cmd);
sda.Fill(ds);
cmd.ExecuteNonQuery();
conn.Close();
return ds;
}
in the above function i want to check whether ds is empty or not.
iam writing as
if (ds.Tables[0].Rows.Count == 0)
{
Response.Write(String.Format(@"<script>alert('Data not found.');</script>"));
}
else
{
}
but it is showing error as"respose" doesnot exist
plz tell me the code
Go to the complete details ...