无法将类型“System.Linq.IQueryable<AnonymousType#1>”隐式转换为“System.Linq.IOrderedQueryabl 本帖最后由 www61550125 于 2012-01-29 00:50:16 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 source = source.Skip(num4).Take(count);=>source = source.ToList().Skip(num4).Take(count); 楼上的:source = source.ToList().Skip(num4).Take(count);同样错误。 var source = from a in this.db.Reader_JD_Comment join b in this.db.Product on a.id equals b.id select new { id = a.id, pj = a.pj, istj = a.istj, parentid = a.parentid, qd = a.qd, isdel = a.isdel, eppName = b.eppName, buyFrom = a.buyFrom, smallclass = a.smallclass, username = a.username, commentType = a.commentType, yd = a.yd, fabudate = a.fabudate, fs = a.fs, smallpic = b.smallpic, spid = a.spid, pinpai = b.pinpai, price = b.price, p_name = b.p_name, pricewebCount = b.pricewebCount, commentAVG = b.commentAVG, commentCount = b.commentCount, sellcount = b.sellcount, smallpic80 = b.smallpic80 } into c where !c.isdel == (c.fabudate < DateTime.Now) where (c.commentType == 0) && (c.smallclass == this.id) where c.parentid == 0 orderby c.fabudate descending select c;=>var source = (from a in this.db.Reader_JD_Comment join b in this.db.Product on a.id equals b.id select new { id = a.id, pj = a.pj, istj = a.istj, parentid = a.parentid, qd = a.qd, isdel = a.isdel, eppName = b.eppName, buyFrom = a.buyFrom, smallclass = a.smallclass, username = a.username, commentType = a.commentType, yd = a.yd, fabudate = a.fabudate, fs = a.fs, smallpic = b.smallpic, spid = a.spid, pinpai = b.pinpai, price = b.price, p_name = b.p_name, pricewebCount = b.pricewebCount, commentAVG = b.commentAVG, commentCount = b.commentCount, sellcount = b.sellcount, smallpic80 = b.smallpic80 } into c where !c.isdel == (c.fabudate < DateTime.Now) where (c.commentType == 0) && (c.smallclass == this.id) where c.parentid == 0 select c).OrderByDescending(c => c.fabudate).ToList(); source =source.orderby(c=> c.fabudate) source = source.Skip(num4).Take(count); this.rptComment.DataSource = source;把你这段改成:this.rptComment.DataSource=source.Skip(num4).Take(count);这样不就可以! source = source.Skip(num4).Take(count).ToList(); 关闭浏览器,清空session问题,怎样限制一个用户不能同时登陆【求解】 .net怎么插入flash asp.net连接mysql的连接问题 求教,IIS7关闭ASP功能 第一本国内原创的《ASP.NET2.0开发指南》,ASP.NET之父Scott Guthrie推荐的 asp.net页面刷新的问题? 那位有能在asp.net使用的treeView控件呀,我在微软件网站载了一个,不能显示呀。 请问得到了一个网站源码,怎么配置可以访问? asp.net菜鸟问题 这是什么错误,未能将临时文件复制到输出目录中? MVC中,想知道页面执行时间,怎么获得? 如何让表格中内容居中?
=>
source = source.ToList().Skip(num4).Take(count);
source = source.ToList().Skip(num4).Take(count);同样错误。
join b in this.db.Product on a.id equals b.id
select new
{
id = a.id,
pj = a.pj,
istj = a.istj,
parentid = a.parentid,
qd = a.qd,
isdel = a.isdel,
eppName = b.eppName,
buyFrom = a.buyFrom,
smallclass = a.smallclass,
username = a.username,
commentType = a.commentType,
yd = a.yd,
fabudate = a.fabudate,
fs = a.fs,
smallpic = b.smallpic,
spid = a.spid,
pinpai = b.pinpai,
price = b.price,
p_name = b.p_name,
pricewebCount = b.pricewebCount,
commentAVG = b.commentAVG,
commentCount = b.commentCount,
sellcount = b.sellcount,
smallpic80 = b.smallpic80
} into c
where !c.isdel == (c.fabudate < DateTime.Now)
where (c.commentType == 0) && (c.smallclass == this.id)
where c.parentid == 0
orderby c.fabudate descending
select c;
=>
var source = (from a in this.db.Reader_JD_Comment
join b in this.db.Product on a.id equals b.id
select new
{
id = a.id,
pj = a.pj,
istj = a.istj,
parentid = a.parentid,
qd = a.qd,
isdel = a.isdel,
eppName = b.eppName,
buyFrom = a.buyFrom,
smallclass = a.smallclass,
username = a.username,
commentType = a.commentType,
yd = a.yd,
fabudate = a.fabudate,
fs = a.fs,
smallpic = b.smallpic,
spid = a.spid,
pinpai = b.pinpai,
price = b.price,
p_name = b.p_name,
pricewebCount = b.pricewebCount,
commentAVG = b.commentAVG,
commentCount = b.commentCount,
sellcount = b.sellcount,
smallpic80 = b.smallpic80
} into c
where !c.isdel == (c.fabudate < DateTime.Now)
where (c.commentType == 0) && (c.smallclass == this.id)
where c.parentid == 0
select c).OrderByDescending(c => c.fabudate).ToList();
source =source.orderby(c=> c.fabudate)
把你这段改成:
this.rptComment.DataSource=source.Skip(num4).Take(count);
这样不就可以!