Click here to Skip to main content
15,914,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use LINQ to SQL.I drag and drop Produces to dbml.
My produce:
SQL
CREATE PROCEDURE GetTableOrder
AS
	select * from ORDER

aspx:
C#
DataContextDataContext dcon = new DataContextDataContext();
protected void Page_Load(object sender, EventArgs e)
{
    loadData();
}

void loadData()
{
    GridView1.DataSource = dcon.GetTableOrder();
    GridView1.DataBind();
}

I have txtid,txtDate,txtidCustomer,txtidWorker on the page.
How to use Databinder?
I know DataBinder.Eval(Container.DataItem,fieldname).I tried and get a error.
Posted

1 solution

Refer this first part and then move to second...... and so on will clear your concept.
http://weblogs.asp.net/scottgu/archive/2006/05/14/Using-LINQ-with-ASP.NET-_2800_Part-1_2900_.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900