缺少数据列表分页的程序集引用

编程入门 行业动态 更新时间:2024-10-15 06:18:39
本文介绍了缺少数据列表分页的程序集引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨 无法解决错误.出现以下错误 找不到类型或名称空间名称"DataListPaging"(是否缺少using指令或程序集引用?) 这是代码

Hi Unable to sort out the mistake. getting the following error The type or namespace name ''DataListPaging'' could not be found (are you missing a using directive or an assembly reference?) here is the code

using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Data.SqlClient;

受保护的void Page_Load(对象发送者,EventArgs e)

protected void Page_Load(object sender, EventArgs e)

if (!IsPostBack) { BindDataList(); DataListPaging cpage = new DataListPaging(); try { cpage.CurrentPageIndex = 0; cpage.PageSize = 5; cpage.DataSource = dt; Session["DT"] = dt; Session["CPAGE"] = cpage; BindList(cpage, dt); } catch (Exception) { } finally { cpage = null; } }

void BindList(DataListPaging cpage, DataTable dt) { try { dlistProfileSearch.DataSource = cpage.DoPaging; dlistProfileSearch.DataBind(); lnkPrev.Enabled = !cpage.IsFirstPage; !cpage.IsLastPage; lblPageStatus.Text = NavigationIndicator(); } catch (Exception) { } finally { cpage = null; } }

请帮助

Please help

推荐答案

Wes指出您要引用的DataListPaging对象必须是第三方或自定义对象,因此您需要引用它所在的程序集.但是,我不认为这是您要尝试做的事情. 阅读此 [ ^ ]并对DataList分页进行一些研究,尤其是我认为您可能想要的PagedDataSource. As Wes has pointed out the DataListPaging object you are referring to must be a third party or custom object and you''ll need to reference the assembly in which it resides. However, I don''t think that''s what you are attempting to do. Read this[^] and do some research on DataList paging and, especially, a PagedDataSource which is what I think you probably want.

更多推荐

缺少数据列表分页的程序集引用

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

发布评论

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

>www.elefans.com

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