problem binding data with gridview

  • Thread starter Thread starter Seema
  • Start date Start date
S

Seema

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;
this.GridView2.DataBind;

ERROR:--> Only assignment, call, increment, decrement, and new object
expressions can be used as a statement
 
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;
            this.GridView2.DataBind;

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

this.GridView2.DataBind()
 
Back
Top