problem binding data with gridview RRS feed

  • Question

  • I have the following coding but when I build it it gives me following error

    public static DataFeedEntities2 entities = new DataFeedEntities2();
    var type = (from p in entities.Address  select p);
                this.GridView2.DataSource = type;

    ERROR:--> Only assignment, call, increment, decrement, and new object expressions can be used as a statement

    Thursday, May 14, 2009 3:00 PM

All replies

  • this.GridView2.DataBind(); // Missing parentheses?

    On a different note, you might run into problems with a static (shared) data context object.
    Thursday, May 14, 2009 3:24 PM