protected void ContentObjectFormView_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "DownloadZip": Label IDLabel = (Label)FindControl("IDLabel"); Label LocationLabel = (Label)FindControl("LocationLabel"); vwarDAL.IDataRepository vd = (new vwarDAL.DataAccessFactory()).CreateDataRepositorProxy();; vd.IncrementDownloads(ContentObjectID); string filePath = Website.Common.FormatZipFilePath(IDLabel.Text.Trim(), LocationLabel.Text.Trim()); string clientFileName = System.IO.Path.GetFileName(filePath); Website.Documents.ServeDocument(vd.GetContentFile(ContentObjectID, clientFileName), clientFileName); vd.Dispose(); vd = null; break; } }