抛出了"system.outofmemoryexception" [英] 'system.outofmemoryexception' was thrown

查看:75
本文介绍了抛出了"system.outofmemoryexception"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将记录与网格视图绑定时,我从表中获取了大约180个字段的许多记录,并抛出了该错误抛出"system.outofmemoryexception",我使用此代码:

I fetch many record from my table it''s around 180 field when i bind this record with my grid view this error throw ''system.outofmemoryexception'' was thrown, I use this code:

var id1 = (from a in linq_obj.detail_msts
                      where a.intglcode == code1
                      select new
                      {
                          holly_senior_all_therapist = a.holly_senior_all_therapist == Convert.ToBoolean("True") ? "Waxing Services > Female Brazilian Waxing > Hollywood XXXX (all off) (first time at salon) > Senior Therapist $60 " : "",
                          holly_pricipal_all_therapist = a.holly_pricipal_all_therapist == Convert.ToBoolean("True") ? "Waxing Services > Female Brazilian Waxing > Hollywood XXXX (all off) (first time at salon) >Principal Therapist $65 " : "",


......直到180条记录


......till 180 record

}).Take(1).ToList();

            grddata.DataSource = id1;
            grddata.DataBind();



它在这里给出错误grddata.DataSource = id1;
谁能解决这个问题...



it gives error at here grddata.DataSource = id1;
can any one solve this...

推荐答案

60": ", holly_pricipal_all_therapist = a.holly_pricipal_all_therapist == Convert.ToBoolean(" )? "
60 " : "", holly_pricipal_all_therapist = a.holly_pricipal_all_therapist == Convert.ToBoolean("True") ? "Waxing Services > Female Brazilian Waxing > Hollywood XXXX (all off) (first time at salon) >Principal Therapist


65": "


......直到180条记录


......till 180 record

}).Take(1).ToList();

            grddata.DataSource = id1;
            grddata.DataBind();



它在这里给出错误grddata.DataSource = id1;
谁能解决这个问题?



it gives error at here grddata.DataSource = id1;
can any one solve this...


好吧,基于错误,您尝试播放的数据量太多.进入大块或对网格进行分页.
Well, based on error, the amount of data you are trying to play around is too much. Get in chunks or paginate the grid.


这篇关于抛出了"system.outofmemoryexception"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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