Below is my code on button search i need to bind my grid and download zip file problem is there zip file is download but my grid is not bind function is called but datalist is not bind
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