数据列表数据源 [英] DataList Datasource

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

问题描述

嗨 我的用户控件中有一个数据列表,此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


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆