protected void btnSubmit_Click(object sender, EventArgs e) { oDB = new DB.Data(); DateTime temp; if (DateTime.TryParse(sAge, out temp)) { Debug.WriteLine(sAge); oDB.UpdatePet(sFirstName, sOldName, oUser.ID, sAge, sWeight, sType); Response.Redirect("pet.aspx"); } else { Age.Text = "Invalid Date Input"; } }
protected void btnSubmit_Click(object sender, EventArgs e) { oDB = new DB.Data(); DateTime temp; if (DateTime.TryParse(Age.Text, out temp)) { oDB.UpdatePet(txtFirstname.Text, "", oUser.ID, Age.Text, Weight.Text, ddlType.SelectedValue); result.Style.Add("display", ""); result.Text = "The profile has been updated. Please add your pet(s)."; Response.Redirect("pet.aspx?Name=" + txtFirstname.Text); } else { Age.Text = "Invalid Date Input"; } }