Hi Experts.... can u suggest me how to find if the dataset has rows..I am comparing textbox value with table value..
If dataset has rows it should execute some code and if dataset has no rows it should execute some other data..Thanks in advance
Loading

Mayur GujrathiPosted May 6, 2011, 2:08 AM
if(ds.Tables(0).Rows.count > 0)
{
Execute code
}
else
{
Execute else code.
}
here ds is dataset
Abhimanyu K VatsaPosted May 6, 2011, 4:05 AM
Ankit NandekarPosted May 6, 2011, 2:46 AM
DataSet ds = new DataSet();
if( ds.Tables[0].Rows.Count>0)
{
write code which u want to execute when row is present in dataset
}
else
{
write code which u want to execute when row is not present in dataset
}