Cannot compute Count for a data source that does not implement ICollection
<p><code>enter code here</code>hi. i am  trying to implment  custom paging in  datalist  control  .
 and  i am using Pagedatasource  to schive this  one
PagedDataSource objPage = new PagedDataSource();</p>

<pre><code>try
{

 datatable ds= (datatable)viewstate["dtimages"]   
 objPage.AllowPaging = true;    
 //Assigning the datasource to the 'objPage' object.
 objPage.DataSource = ds.Dataset.Tables["Gallery"].ToString();
 //Setting the Pagesize
 objPage.PageSize = 8;
 dlGallery.DataSource = objPage;
dlGallery.DataKeyField = "Image_ID";
**dlGallery.DataBind();// getting error**
}

catch(Exception ex)
{
 throw ex;
}
</code></pre>

<p>Cannot compute Count for a data source that does not implement ICollection.</p>

<p>why is this happening does any  one  can  help me out 
  thank  you </p>
