数据列表数据源

编程入门 行业动态 更新时间:2024-10-24 14:19:53
本文介绍了数据列表数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

更多推荐

数据列表数据源

本文发布于:2023-08-05 21:33:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1308182.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据源   数据   列表

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!