62,068
社区成员
发帖
与我相关
我的任务
分享
foreach (var cat in cateTeam.SubCategories)
{
if (cat.IsMagazine.HasValue && cat.IsMagazine.Value)
{
@Html.ActionLink(cat.Name, "Magazine", "Lib", new RouteValueDictionary { { "id", cat.ID } }, null); //杂志类型
}
else
{
@Html.ActionLink(cat.Name, "Category", "Lib", new { id = cat.ID }, new { target = "_blank", title = cat.Name }) //一般分类
}
counter6 = counter6 + 1;
if (counter6 % 6 == 0)
{
<br />
counter6 = 0;
}
else
{
string strTemp = string.Empty;
int length = cat.Name.Length;
@strTemp.PadRight(15 - length, ' ');
}
}
<div>
@foreach (var cat in Model.CateFather)
{
if (cat.IsMagazine.HasValue && cat.IsMagazine.Value)
{
<div style="width:200px;float:left">
@Html.ActionLink(cat.Name, "Magazine", "Lib",new { id = cat.ID }, new { target = "_blank", title = cat.Name });
</div>
}
else
{
continue;//@Html.ActionLink(cat.Name, "Category", "Lib", new { id = cat.ID }, new { target = "_blank", title = cat.Name }) //一般分类
}
counter6 = counter6 + 1;
if (counter6 % 6 == 0)
{
<br />
counter6 = 0;
}
}
</div>