public void BindValues() { try { AboutU objAbout = AboutUsController.GetAboutUsById(AboutUsId); txtDescp.Text = objAbout.Description; txtHeading.Text = objAbout.heading; //if (objAbout.image != "") // abtUsImg.ImageUrl = objAbout.image; } catch (Exception ex) { throw ex; } }
public void UpdateAboutUs() { try { AboutU objAbout = AboutUsController.GetAboutUsById(AboutUsId); objAbout.heading = txtHeading.Text; objAbout.Description = txtDescp.Text; //if (fileUpldImg.HasFile) //{ // string fileName = Path.GetFileName(fileUpldImg.FileName); // string path = Server.MapPath("~/assets/assets/images/fitness/" + fileName); // fileUpldImg.SaveAs(path); // objAbout.image = "~/assets/assets/images/fitness/" + fileName; //} objAbout = new AboutUsController().UpdateAboutUs(objAbout); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "succ_msg", "MessageBox('Success','Data Updated');", true); } catch (Exception ex) { throw ex; } }