ASP.NET [How to check if SqlDataSource1 is empty] -


I am creating SqlDataSource1.DataBind ();

So I'm working on the gatebound ();

But if my SqlDataSource1 returns empty data then I get an error, even if I'm trying to 'check that if (GridView2.HeaderRow.Cells.Count! = 0) then I think That i have to check it on rough at SqlDataSource1 Question: How?

Thanks

GridView2.HeaderRow is zero when the data source is zero You can check that GridView2.HeaderRow = null


Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -