Click here to Skip to main content
15,900,511 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx6-Dec-14 7:53
professionaljkirkerx6-Dec-14 7:53 
GeneralWorking copy of your code. Pin
jkirkerx6-Dec-14 9:00
professionaljkirkerx6-Dec-14 9:00 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 14:47
samflex6-Dec-14 14:47 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 16:21
samflex6-Dec-14 16:21 
QuestionAsp.net page with Web Service WITHIN code behind being called Pin
StealthRT4-Dec-14 5:13
StealthRT4-Dec-14 5:13 
QuestionRe: Asp.net page with Web Service WITHIN code behind being called Pin
jkirkerx4-Dec-14 8:55
professionaljkirkerx4-Dec-14 8:55 
SuggestionRe: Asp.net page with Web Service WITHIN code behind being called Pin
ZurdoDev4-Dec-14 10:45
professionalZurdoDev4-Dec-14 10:45 
Question.NET System.OutOfMemoryException in View using DisplayTemplate Pin
G-Alonso30-Nov-14 1:39
G-Alonso30-Nov-14 1:39 
I'm getting "System.OutOfMemoryException in mscorlib.dll" exception in a View when using DisplayTemplate. I've simplified my code to this:

C#
@model IEnumerable<T>
@{
    Layout = null;
}
@{int i = 0;}
@foreach (var item in Model)
    {
        i += 1;
        @Html.DisplayFor(modelItem => item.dsk_distancia, "distancia");
        @Html.DisplayFor(modelItem => item.dsk_eurom2,"entero");

        }


Where the DisplayTemplates "distancia" and "entero" goes as follows.

distancia.cshtml
C#
@model double?

@Model.Value.ToString("F0") m.


entero.cshtml
C#
@model double?

@Model.Value.ToString("F0")


The problem happens when the number of items increases. It works fine when the IEnumerable has less items but stops working with i>600 items or so.

I've detected that the problem is in the DisplayTemplate, because if I just use
C#
@Html.DisplayFor(modelItem => item.dsk_distancia);
@Html.DisplayFor(modelItem => item.dsk_eurom2);


or

C#
@item.dsk_distancia;
@item.dsk_eurom2;


then the exception is not thrown
AnswerRe: .NET System.OutOfMemoryException in View using DisplayTemplate Pin
Matt U.4-Dec-14 4:43
Matt U.4-Dec-14 4:43 
QuestionDisplaying javascript values from one page to another using multiview Pin
samflex29-Nov-14 14:10
samflex29-Nov-14 14:10 
AnswerRe: Displaying javascript values from one page to another using multiview Pin
Anurag Gandhi30-Nov-14 22:41
professionalAnurag Gandhi30-Nov-14 22:41 
GeneralRe: Displaying javascript values from one page to another using multiview Pin
samflex1-Dec-14 5:54
samflex1-Dec-14 5:54 
Questioncan anyoen tell me when i use file upload in asp.net.how to rename file with id..its very urgent..plz Pin
Sanju Choudhary S28-Nov-14 2:13
Sanju Choudhary S28-Nov-14 2:13 
AnswerRe: can anyoen tell me when i use file upload in asp.net.how to rename file with id..its very urgent..plz Pin
den2k8828-Nov-14 2:38
professionalden2k8828-Nov-14 2:38 
AnswerRe: can anyoen tell me when i use file upload in asp.net.how to rename file with id..its very urgent..plz Pin
Richard Deeming28-Nov-14 2:43
mveRichard Deeming28-Nov-14 2:43 
GeneralRe: can anyoen tell me when i use file upload in asp.net.how to rename file with id..its very urgent..plz Pin
jaimin851-Dec-14 23:13
jaimin851-Dec-14 23:13 
GeneralRe: can anyoen tell me when i use file upload in asp.net.how to rename file with id..its very urgent..plz Pin
Richard Deeming2-Dec-14 2:23
mveRichard Deeming2-Dec-14 2:23 
QuestionJavascript Scanner recognition Pin
Member 1035398227-Nov-14 22:54
Member 1035398227-Nov-14 22:54 
AnswerRe: Javascript Scanner recognition Pin
ZurdoDev2-Dec-14 3:14
professionalZurdoDev2-Dec-14 3:14 
QuestionHashing fields pre server post Pin
Dale17727-Nov-14 14:09
Dale17727-Nov-14 14:09 
AnswerRe: Hashing fields pre server post Pin
Kornfeld Eliyahu Peter27-Nov-14 19:12
professionalKornfeld Eliyahu Peter27-Nov-14 19:12 
GeneralRe: Hashing fields pre server post Pin
Dale17727-Nov-14 20:24
Dale17727-Nov-14 20:24 
GeneralRe: Hashing fields pre server post Pin
Kornfeld Eliyahu Peter27-Nov-14 20:35
professionalKornfeld Eliyahu Peter27-Nov-14 20:35 
GeneralRe: Hashing fields pre server post Pin
Richard Deeming28-Nov-14 2:38
mveRichard Deeming28-Nov-14 2:38 
AnswerRe: Hashing fields pre server post Pin
Michael_Cox3-Dec-14 6:38
Michael_Cox3-Dec-14 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.