there is no row at position 0

07 Dec

it is always good to validate wether the dataset has data or is empty you can use something like this to cover all validations

if(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
//process data
// it is empty

1 Comment

Posted by on December 7, 2012 in ASP Dot Net C#


Tags: , ,

One response to “there is no row at position 0

  1. rajesh

    April 25, 2014 at 9:53 am

    Hi.. i have a form iam sending 5 mails individually different times not all at a time and i have given a link in gridview in view state all the 5 mails are displaying at a time so according to the subject i should be able to display the mail content in popup from gridview. i have created view method in bl layer and different methods in popup so please help me to display each mail individually according to the subject


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: