protected void Page_Load(object sender, EventArgs e) { try { ppSurvey = PreviousPage.survey; populateTable(ppSurvey); lblSummary.Text = ppSurvey.ToString(); imgUploaded.ImageUrl = "/Images/" + ppSurvey.ImgUrl; } catch (NullReferenceException nre) { lblSummary.Text = "WARNING: Table not updated from survey data."; imgUploaded.ImageUrl = "/Images/no_image.png"; } }
protected void Page_Load(object sender, EventArgs e) { //TODO: -5 need to check to make sure you have a valid previous page. RJG if (PreviousPage!=null && PreviousPage.IsValid) { try { ppSurvey = PreviousPage.survey; populateTable(ppSurvey); lblSummary.Text = ppSurvey.ToString(); imgUploaded.ImageUrl = "/Images/" + ppSurvey.ImgUrl; } catch (NullReferenceException nre) { lblSummary.Text = "WARNING: Table not updated from survey data."; imgUploaded.ImageUrl = "/Images/no_image.png"; } } else { //TODO: -3 does not redirect to previous page when data invalid or not avaialble. RJG Response.Redirect("ValidationPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (PreviousPage!=null && PreviousPage.IsValid) { try { ppSurvey = PreviousPage.survey; populateTable(ppSurvey); lblSummary.Text = ppSurvey.ToString(); imgUploaded.ImageUrl = "/Images/" + ppSurvey.ImgUrl; } catch (NullReferenceException) { lblSummary.Text = "WARNING: Table not updated from survey data."; imgUploaded.ImageUrl = "/Images/no_image.png"; } } else { if (!Page.IsPostBack) Response.Redirect("Page6.aspx"); } }