Error calling method in code Behind

Asked

Viewed 31 times

-1

using System;
using Treinamento.DTO.Global;
using Treinamento.BLL;
namespace Treinamento.WEB.Tabelas.cidade
{
public partial class Listar : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        GridView1.DataSource = CidadeBLL.Instance.Listar();
        GridView1.DataBind();

        if (GridView1.Rows.Count == 0)
            LabelMensagem.Visible = true;
    }

    protected void GridView1_SelectedIndexChanged(object sender, EventArgs 
    e)
    {

    }
  }
}

Severity Code Description Project File Line Suppression State Error CS1061 'Object' does not contain a Definition for 'List' and no Extension method 'List' Accepting a first argument of type 'Object' could be found (are you Missing a using Directive or an Assembly Reference?) Training.WEB C: Users Danilo.costa Desktop Trainingnet source Training.WEB City Tables Listar.aspx.Cs 10 Active

1 answer

1


CidadeBLL.Instancedoes not have the method Listar() or has not been properly initialized.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.