开发者

How to rectify the error in asp.net [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜