protected void btnModificar_Click(object sender, EventArgs e) { try { string imagen = ""; if (fileimageFoto.HasFile) { //Guardo la ruta relativa imagen = "~/Images/" + fileimageFoto.FileName; //Para almacenar necesito la ruta ABSOLUTA fileimageFoto.SaveAs(Server.MapPath(imagen)); //Después de guardar, puedo mostrar img.ImageUrl = imagen; } else { imagen = img.ImageUrl; } string hotel = txtHotel.Text; string calle = txtCalle.Text; int puerta = Convert.ToInt32(txtNroPuerta.Text.Trim()); string ciudad = txtCiudad.Text; int telefono = Convert.ToInt32(txtTelefono.Text); int fax = Convert.ToInt32(txtFax.Text); bool playa = RBPlaya.Checked; bool piscina = RBPiscina.Checked; int estrellas = Convert.ToInt32(RBEstrellas.SelectedValue); Hotel hot = new Hotel(hotel, calle, puerta, ciudad, telefono, fax, playa, piscina, estrellas, imagen); LogicaHoteles.Modificar(hot); EstadoInicial(); lblMensaje.Text = "Se modifico correctamente el hotel " + hotel + "."; } catch (Exception ex) { lblMensaje.Text = ex.Message; } }