以下は、ボタン検索の私のコードです。グリッドをバインドしてzipファイルをダウンロードする必要があります。問題は、zipファイルがダウンロードされているが、グリッドがバインドされていない関数が呼び出されているが、データリストがバインドされていないことです。
Private Sub BindGrid()
    SQL = "Select JameatID,JamaatID,MadrassahID, JameatName,JamaatName,MadrassahName,StudentID,ClassID,DIvisionName,FullName,datediff (year ,DOB,getdate() )as Age  from vwstudent vw LEFT OUTER JOIN CMaster cm ON vw.ClassID =cm.CMID AND MasterName ='ClassID'  where 1=1   order by JameatName,JamaatName,MadrassahName,cm.OrderId "
    Dim ds As New dataset
    ds = gc.GetDataToListBinder(SQL)
    DListPhotoInfo.DataSource = ds 
    DListPhotoInfo.DataBind()
End Sub
Private Sub DownloadImage(ByVal EJID As String)
    Dim DS As Data.DataSet
    Dim tmpZipFile As String
    tmpZipFile = System.IO.Path.GetTempFileName
    Dim zipFile As New GraficaliZip(tmpZipFile)
    zipFile.CreateZipFile()
    Dim strID() As String = Split(EJID.Trim, ",")
    For i As Integer = 0 To strID.Length - 1
         If ImageExist(strID(i).Trim) = True Then
             zipFile.PutFile(Server.MapPath(".") & _
                             "\Photo\" & strID(i).Trim & _
                             ".jpg", strID(i).Trim & ".jpg")
         End If
     Next
       BindGrid() ///from here i am binding grid
     zipFile.SaveFile()
     gc.DownLoadFileFromServer("", tmpZipFile & ".zip", "Photo.zip")
End Sub
Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
    DownloadImage("20312059,20313178")
    PnlGrid.Visible = True
End Sub