lauren brown

lauren brown

  • NA
  • 33
  • 93.5k

Pop-up message error

Jan 25 2011 12:54 AM

Hi currently I am doing a online calendar project.
There ia a drop-down list tied to reminder(label) and when i select any of the reminder options in the ddl and
click on downlaod pdf button, there should be a message box that tells users they are not allow to select any of the reminder options
for PDF.
This is the code that i have entered:
 

protected void downloadPDFBtn_Click(object sender, ImageClickEventArgs e)
    {
        //calls the method to create the datatable
        GetCustomMadeDataTable();
        //calls the method to generate the pdf from the datatable
        GeneratePDF(table);
        //popup error message when staff choose one of the field under the Reminder field and click on the "download PDF" button.
        if (DropDownList1.SelectedItem.Value != null)
        {           
            MessageBox.Show("There is no timetable available for");
            Response.Redirect("DownloadTimetable.aspx");                   
        }
Thanks ur help is deeply appreciated. Hope to hear from u soon!

Answers (6)