我使用MVC4,我遇到了一个大问题。
cshtml代码:
@{
int degersayac = 0;
Object[] degerler = { item3.AKS, item3.AOS, item3.AZS, item3.IKS, item3.IOS, item3.IZS, item3.PKS, item3.POS, item3.PZS };
}
@foreach (var item4 in new[] { "Anımsama", "İşlevsel", "Program" })
{
foreach (var item5 in new[] { "Kolay", "Orta", "Zor" })
{
<td>
@Html.TextBox("veri[" + sayac + "].soruAdeti", 0,
new
{
Style = "width:100%",
data_val = "true",
data_val_required = "No. of joinees is required",
data_val_number = "The field No. of joinees must be a number.",
data_val_range = "No. of joinees should be minimum 2 and not more than 10",
data_val_range_max = "10",
data_val_range_min = "0",
}
)
@Html.Hidden("veri[" + sayac + "].BO_ID", item3.BO_ID)
@Html.Hidden("veri[" + sayac + "].Zorluk", item5)
@Html.Hidden("veri[" + sayac + "].Duzey", item4)
@{sayac++; degersayac++;}
</td>
}
}
这两个foreach在其他foreach中如
@foreach(var item in model)
{
}
实体框架中的模型。模型将有超过1000条记录,我应该创建record * 9
文本框和record * 3 * 9
隐藏值。
然而,这个页面开得太慢了:(
此页面可能会向其他操作发布12,000个值。这需要太长时间(超过15秒)并且从Chrome浏览器崩溃页面警报(页面崩溃,关闭页面或等待)。 如果我等待,页面已加载,但我不想等待太久。