problem binding data with gridview

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
 
G

Guest

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()
 
Joined
Mar 4, 2009
Messages
17
Reaction score
0
I THINK THE PROBLEM IS IN
var type = (from p in entities.Address select p);
this line. Check that both are same object.

REGARDS
shawpnendu.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top