Asp.net mvc 表的OutOfMemory异常
我试图在每一列中用随机颜色填充表格(以表格形式创建图像是一个粗略的想法)(听起来可能有点滑稽)。 我用下面给出的代码创建了一个视图,但给了我OutOfMemoryException。任何形式的帮助都是值得的。 我在一个MVC应用程序中这样做Asp.net mvc 表的OutOfMemory异常,asp.net-mvc,out-of-memory,Asp.net Mvc,Out Of Memory,我试图在每一列中用随机颜色填充表格(以表格形式创建图像是一个粗略的想法)(听起来可能有点滑稽)。 我用下面给出的代码创建了一个视图,但给了我OutOfMemoryException。任何形式的帮助都是值得的。 我在一个MVC应用程序中这样做 <table> @(int i=0;i<10;i++) { red = random.Next(0, 255); green = random.Next(0, 255); blue = random.Next(0,
<table>
@(int i=0;i<10;i++)
{
red = random.Next(0, 255);
green = random.Next(0, 255);
blue = random.Next(0, 255);
hexColour = String.Format("#{0:X2}{1:X2}{2:X2}", red, green, blue);
<tr style="height:1px !important; width:1px !important;background-color:'@hexColour'">
@{
for(int j=0;i<10;j++)
{
red = random.Next(0, 255);
green = random.Next(0, 255);
blue = random.Next(0, 255);
hexColour = String.Format("#{0:X2}{1:X2}{2:X2}", red, green, blue);
<td style="height:1px !important; width:1px !important;background-color:'@hexColour'"></td>
}
</tr>
}
}
</table>
@(inti=0;ifor(intj=0;ifor(intj=0;ifor)(intj=0;ifor)(intj=0;我应该注意到的。无论如何,非常感谢。:)哦,我应该注意到的。无论如何,非常感谢。:)哦,伙计,我应该注意到的。无论如何,非常感谢。:)哦,老兄,我应该注意到的。无论如何,非常感谢你。:)
for(int j=0;i<10;j++)
for(int j=0;j<10;j++)