本文介绍了使用mod%2在两个中继器上拆分数据集结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我试图在两个转发器之间分割我的数据集的结果,显示左转发器中的所有偶数和右边的奇数索引。到目前为止,我的代码如下: CoachFavPlayerProvider coachFavPlayer = new CoachFavPlayerProvider(); DataSet dataset = coachFavPlayer.CoachFavPlayer(CoachID); DataTable leftContent = dataset.Tables [ 0 ]; DataTable rightContent = dataset.Tables [ 0 ]; favRepeater.DataSource = rightContent; favRepeaterRight.DataSource = leftContent; favRepeaterRight.DataBind(); favRepeater.DataBind(); 这显然只是将这一切都绑定到两个中继器上,我不知道我的生活如何分解它。提前致谢! :) 解决方案 im trying to split the results of my dataset between two repeaters, displaying all the even in the left repeater and the odd index in the right. so far my code is as follows.CoachFavPlayerProvider coachFavPlayer = new CoachFavPlayerProvider();DataSet dataset = coachFavPlayer.CoachFavPlayer(CoachID);DataTable leftContent = dataset.Tables[0];DataTable rightContent = dataset.Tables[0]; favRepeater.DataSource = rightContent;favRepeaterRight.DataSource = leftContent;favRepeaterRight.DataBind();favRepeater.DataBind();this obviously just binds the whole lot to both repeaters, and i cant for the life of me figure out how to split it. thanks in advance! :) 解决方案 这篇关于使用mod%2在两个中继器上拆分数据集结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-21 01:30