嗨 我的用户控件中有一个数据列表,此DataList在不同情况下有一些数据源(一些存储过程),现在在DataList_ItemDataBound事件中,我想找到productid返回(productid是我的数据库表中的文件,此文件返回的所有我的存储过程) ,我知道如何使用e.Item.DataItem,但我不知道该如何使用. 我认为应该将其转换为数据类型,但我不知道哪种数据类型 (我使用LINQ技术) 我这样称呼存储过程:
Hi i have a DataList in my usercontrol, this DataList in different situation have some datasource (some storedprocedure), now in DataList_ItemDataBound event, i want find the productid return (productid is a filed in my database table, this filed return with all my storedprocedure), i khow, i must use e.Item.DataItem, but i don''t know how i must use it. i think i should cast it to a data type, but i don''t know which data type (i use LINQ technology) i call storedprocedure like this:
var q = db.CatalogGetProductsOnDeptPromo(Int32.Parse(departmentId), BalloonShopConfiguration.ProductDescriptionLength, Int32.Parse(page), BalloonShopConfiguration.ProductsPerPage, ref howManyPages); DataList.DataSource = q; DataList.DataBind();CatalogGetProductsOnDeptPromo是我的存储过程 请帮助我, 关于iman
CatalogGetProductsOnDeptPromo is my storedprocedure please help me, regard iman
推荐答案您是否已调试过调试程序?它会告诉您有关类型的所有信息. 另外,您可能需要阅读此 [ ^ ] Have you stepped through with a debugger? It will tell you everything you want to know about the types. Also, you may want to read this[^]
感谢BUT 因为我使用了3或4个存储过程,所以我的数据源发生了变化,所以我不知道当时哪个存储过程是我的数据源 thanks BUT because i use 3 or 4 storedprocedure, my datasource became change, so i don''t know which storedporcedure at that time is my datasource
更多推荐
数据列表数据源
发布评论