本文介绍了数据列表数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我的用户控件中有一个数据列表,此DataList在不同情况下有一些数据源(一些存储过程),现在在DataList_ItemDataBound事件中,我想找到productid返回(productid是我的数据库表中的文件,此文件返回的所有我的存储过程) ,我知道如何使用e.Item.DataItem,但我不知道该如何使用.
我认为应该将其转换为数据类型,但我不知道哪种数据类型
(我使用LINQ技术)
我这样称呼存储过程:

Hii 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

推荐答案



这篇关于数据列表数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 18:02