title: How to bind data in gridview in asp.net without using properties
body: <p>I have this code I want to bind data to grid view without using properties .</p>
  
  <pre><code>        public class UserTerritory
          {
             public string TerrId;
             public string TerrName;
             public string AccAccessLevel;
  
             public UserTerritory(string _TerrId, string _TerrName, string _AccAccessLevel)
             {
                this.TerrId = _TerrId;
                this.TerrName = _TerrName;
                this.AccAccessLevel= _AccAccessLevel;
             }
          }
      protected void Page_Load(object sender, EventArgs e)
      {
          List&lt;UserTerritory&gt; ut = new List&lt;UserTerritory&gt;();
          ut.Add(new UserTerritory("1", "x", "a"));
          ut.Add(new UserTerritory("2", "y", "b"));
          ut.Add(new UserTerritory("3", "z", "c"));
  
  
  
          grdUserTerr.DataSource = ut;
          grdUserTerr.DataBind();
      }
  </code></pre>
  
  <p>When I execute the above code I get following Httpexception "  The data source for GridView with id 'grdUserTerr' did not have any properties or attributes from which to generate columns.  Ensure that your data source has content."</p>
  
  <p>Can Somebody tell me what wrong I am doing ?</p>
  
  <p>Thanks for your reply </p>