protected void btnDownloadSchedule_Click(object sender, EventArgs e)
        {
            if (dateDownloadTo.Date.Subtract(dateDownloadFrom.Date).TotalDays < 1)
            {
                lblDownloadErr.Text = Resources.Club.DownloadClubScheduleBadDateRange;
            }
            else
            {
                IEnumerable <ScheduledEvent> rgevents = ScheduledEvent.AppointmentsInTimeRange(dateDownloadFrom.Date, dateDownloadTo.Date, CurrentClub.ID, CurrentClub.TimeZone);
                CurrentClub.MapAircraftAndUsers(rgevents);  // fix up aircraft, usernames
                gvScheduleDownload.DataSource = rgevents;
                gvScheduleDownload.DataBind();

                Response.Clear();
                Response.ContentType = "text/csv";
                // Give it a name that is the brand name, user's name, and date.  Convert spaces to dashes, and then strip out ANYTHING that is not alphanumeric or a dash.
                string szFilename    = String.Format(CultureInfo.InvariantCulture, "{0}-{1}-{2}", Branding.CurrentBrand.AppName, Resources.Club.DownloadClubScheduleFileName, CurrentClub.Name.Replace(" ", "-"));
                string szDisposition = String.Format(CultureInfo.InvariantCulture, "attachment;filename={0}.csv", System.Text.RegularExpressions.Regex.Replace(szFilename, "[^0-9a-zA-Z-]", ""));
                Response.AddHeader("Content-Disposition", szDisposition);
                gvScheduleDownload.ToCSV(Response.OutputStream);
                Response.End();
            }
        }