Exemple #1
0
    protected void CargarForm()
    {
        try
        {
            Producto mAux = ProductoService.GetProducto(int.Parse(Request.QueryString["Id"]));

            txtNombre.Text             = mAux.Nombre;
            txtDescripcion.Text        = mAux.Descripcion;
            txtPrecio.Text             = mAux.Precio.ToString();
            txtMarca.Text              = mAux.Marca;
            ddlCategoria.SelectedValue = mAux.Categoria.Id.ToString();
            imgProducto.ImageUrl       = mAux.Imagen;
        }
        catch (Exception ex)
        {
            Response.Redirect("Error.aspx?" + ex.Message);
        }
    }