如何与Linq to sql一起在asp.net 2008中使用Databinder? [英] How to use Databinder in asp.net 2008 with Linq to sql?
本文介绍了如何与Linq to sql一起在asp.net 2008中使用Databinder?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用LINQ to SQL.将Produces拖放到dbml.
我的作品:
I use LINQ to SQL.I drag and drop Produces to dbml.
My produce:
CREATE PROCEDURE GetTableOrder
AS
select * from ORDER
aspx:
aspx:
DataContextDataContext dcon = new DataContextDataContext();
protected void Page_Load(object sender, EventArgs e)
{
loadData();
}
void loadData()
{
GridView1.DataSource = dcon.GetTableOrder();
GridView1.DataBind();
}
我的页面上有txtid,txtDate,txtidCustomer,txtidWorker.
如何使用Databinder?
我知道DataBinder.Eval(Container.DataItem,fieldname).我尝试并得到一个错误.
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.
推荐答案
请参阅此第一部分,然后移至第二部分. ..等等会清除您的概念.
http://weblogs.asp. net/scottgu/archive/2006/05/14/Using-LINQ-with-ASP.NET-_2800_Part-1_2900_.aspx [
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[^]
这篇关于如何与Linq to sql一起在asp.net 2008中使用Databinder?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文