How to rectify the error in asp.net [closed]
I create an one webpage in asp.net all the time i am facing the following pbm how to rectify it..
if(ds.Tables[0].Rows.Count > 0开发者_StackOverflow)
Maybe you need to check that ds.Tables[0] exists first
If you are constantly checking on your pages to see if that dataset has a table with rows, I would think you would want to make some helper class to check that your dataset is not null, and that whatever tables have actual rows. Also you might want to think about moving these to typed datasets.
精彩评论