I have the following code, It loads the photos in that placeholder. ID="phPhotos" >
public partial class ImovelDetalhe : System.Web.UI.Page
{
private ImovelBo _imovelBo;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
carregarInformacoes();
}
}
private void carregarInformacoes()
{
int codigoImovel = 0;
Int32.TryParse(Request.QueryString["CodImovel"], out codigoImovel);
_imovelBo = new ImovelBo();
var imovel = _imovelBo.ObterDetalhe(codigoImovel);
if (imovel != null)
{
lblDescricao.Text = imovel.Descricao;
lblOperacao.Text = imovel.Operacao;
lblCidade.Text = imovel.Cidade;
lblLocalizacao.Text = imovel.Localizacao;
lblTipoImovel.Text = imovel.Tipo;
lblQtDormitorios.Text = imovel.QntDormitorio.ToString();
lblValor.Text = imovel.Valor.ToString("#,##0.00");
if (imovel.Fotos != null)
{
foreach (var item in imovel.Fotos)
{
Image foto = new Image();
foto.Width = 500;
foto.Height = 400;
foto.ImageUrl = item;
phFotos.Controls.Add(foto);
}
}
}
}
}
And when I run the images it looks like this: one below the other
Could someone help us make a car, slide show or a banner? as per this example or simpler:
I could not get past the path of the photos that are in the bank and at the root