Ir para conteúdo
Fórum Script Brasil

Pesquisar na Comunidade

Mostrando resultados para as tags ''webforms''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • Programação & Desenvolvimento
    • ASP
    • PHP
    • .NET
    • Java
    • C, C++
    • Delphi, Kylix
    • Lógica de Programação
    • Mobile
    • Visual Basic
    • Outras Linguagens de Programação
  • WEB
    • HTML, XHTML, CSS
    • Ajax, JavaScript, XML, DOM
    • Editores
  • Arte & Design
    • Corel Draw
    • Fireworks
    • Flash & ActionScript
    • Photoshop
    • Outros Programas de Arte e Design
  • Sistemas Operacionais
    • Microsoft Windows
    • GNU/Linux
    • Outros Sistemas Operacionais
  • Softwares, Hardwares e Redes
    • Microsoft Office
    • Softwares Livres
    • Outros Softwares
    • Hardware
    • Redes
  • Banco de Dados
    • Access
    • MySQL
    • PostgreSQL
    • SQL Server
    • Demais Bancos
  • Segurança e Malwares
    • Segurança
    • Remoção De Malwares
  • Empregos
    • Vagas Efetivas
    • Vagas para Estágios
    • Oportunidades para Freelances
  • Negócios & Oportunidades
    • Classificados & Serviços
    • Eventos
  • Geral
    • Avaliações de Trabalhos
    • Links
    • Outros Assuntos
    • Entretenimento
  • Script Brasil
    • Novidades e Anúncios Script Brasil
    • Mercado Livre / Mercado Sócios
    • Sugestões e Críticas
    • Apresentações

Encontrar resultados em...

Encontrar resultados que...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Encontrado 1 registro

  1. Boa noite, estou com problema para exibir a foto no browser o repeater traz todas as informações do banco menos a foto. Inseri os dados manualmente no banco.//TABELACREATE TABLE [dbo].[Imoveis]([CodImovel] [int] IDENTITY(1,1) NOT NULL,[Descricao] [varchar](750) NOT NULL,[QtdDorms] [int] NOT NULL,[TipoImovel] [varchar](7) NOT NULL,[Localizacao] [varchar](6) NOT NULL,[Valor] [money] NOT NULL,[Operacao] [varchar](7) NULL,[Cidade] [varchar](75) NULL,[Foto] [varchar](150) NULLPRIMARY KEY CLUSTERED ([CodImovel] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]//OBJETO DE TRANSFERENCIAusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Entities{public class Imovel{public int CodImovel { get; set; }public string Descricao { get; set; }public int QtdDorms { get; set; }public string TipoImovel { get; set; }public string Localizacao { get; set; }public double Valor { get; set; }public string Operacao { get; set; }public string Cidade { get; set; }public string Foto { get; set; }}}//DAL://Conexão com o banconamespace DAL{public class Conexao{public static string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["EDGImoveisConnectionString"].ConnectionString;public static SqlConnection connection = new SqlConnection(connectionString);public static void Conectar(){if (connection.State == System.Data.ConnectionState.Closed){connection.Open();}}public void Desconectar(){if (connection.State == System.Data.ConnectionState.Open){connection.Close();}}}}namespace DAL{public class ImovelDao{public List<Imovel> ObterTodasCasas(){try{var command = new SqlCommand();command.Connection = Conexao.connection;command.CommandText = "SELECT * FROM Imoveis";Conexao.Conectar();var reader = command.ExecuteReader();var imoveis = new List<Imovel>();while (reader.Read()){var imovel = new Imovel();imovel.CodImovel = Convert.ToInt32(reader["CodImovel"]);imovel.Descricao = reader["Descricao"].ToString();imovel.QtdDorms = Convert.ToInt32(reader["QtdDorms"]);imovel.TipoImovel = reader["TipoImovel"].ToString();imovel.Localizacao = reader["Localizacao"].ToString();imovel.Valor = Convert.ToDouble(reader["Valor"]);imovel.Foto = reader["Foto"].ToString();imoveis.Add(imovel); }return imoveis;}catch (Exception){throw;}}}}//BLLnamespace BLL{public class ImovelBo{private ImovelDao _ImovelDao;public List<Imovel> ObterTodasCasas(){_ImovelDao = new ImovelDao();return _ImovelDao.ObterTodasCasas();}}}//.CSnamespace EDGOficial.Painel{public partial class Imoveis : System.Web.UI.Page{private ImovelBo _imovelBo;protected void Page_Load(object sender, EventArgs e){CarregarImoveisNoRepeater();}private void CarregarImoveisNoRepeater(){_imovelBo = new ImovelBo();RepeaterCasas.DataSource = _imovelBo.ObterTodasCasas();RepeaterCasas.DataBind();}}}//.ASPX<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"><div id="paginas"><asp:Repeater ID="RepeaterCasas" runat="server"><ItemTemplate><div class="capaCasa"><img src="../Content/ImagensCasas/" <%#DataBinder.Eval(Container.DataItem,"Foto") %> "/></div><div class="NomeCasa"><%#DataBinder.Eval(Container.DataItem,"Descricao") %></div></div></ItemTemplate></asp:Repeater></div></asp:Content>Se alguém ai puder ajudar agradeço muito!! :D
×
×
  • Criar Novo...