Estou fazendo uma pagina para exibição utilizando o repeater. Estava aparendo as informações do banco de dados na exibição, porém, quando comecei a melhorar o layout a pagina começou a aparecer erro. Estou pesquisando no google, mas ainda não achei solução.
alguém pode me ajudar? Sabem o que pode ser?
Erro que ocorre:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'Repeater1_ItemCommand' and no extension method 'Repeater1_ItemCommand' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)
Pergunta
Pajé
Boa tarde pessoal,
Estou fazendo uma pagina para exibição utilizando o repeater. Estava aparendo as informações do banco de dados na exibição, porém, quando comecei a melhorar o layout a pagina começou a aparecer erro. Estou pesquisando no google, mas ainda não achei solução.
alguém pode me ajudar? Sabem o que pode ser?
Erro que ocorre:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'Repeater1_ItemCommand' and no extension method 'Repeater1_ItemCommand' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)
Vejam meu codigo:
pagina DEFAUL.ASPX
PAGINA DEFAULT.ASPX.CSusing System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { DAOcontato dao = new DAOcontato(); Repeater1.DataSource = dao.Listar(); Repeater1.DataBind(); } protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { Label tst = (Label)e.Item.FindControl("lblteste"); Label subj = (Label)e.Item.FindControl("lblsubj"); Image img = (Image)e.Item.FindControl("img"); tst.Text = ((System.Data.DataRowView)e.Item.DataItem)[1].ToString(); subj.Text = ((System.Data.DataRowView)e.Item.DataItem)[2].ToString(); if ((((System.Data.DataRowView)e.Item.DataItem)[3]) != DBNull.Value) img.ImageUrl = this.ResolveUrl(@"~/IMG/" + ((System.Data.DataRowView)e.Item.DataItem)[3].ToString()); else img.Visible = false; } } }Editado por kuroiAdicionar tag CODE
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.