asp.net mvc创建动态标签

时间:2015-09-15 09:34:12

标签: c# jquery asp.net-mvc jquery-ui razor

<div id="tabs">
    <ul id="editorRows">
        @foreach (var item in (IEnumerable<WebSiteLanguage>)ViewBag.WebSiteLanguages)
        {
            @*<li><a href=@Url.Action("PageLanguageWiseContent", "Page", new { LangId = item.LangId })><span>@item.Language.LangName</span></a></li>*@
              <li><a href="#@item.LangName"><span>@item.LangName</span></a></li>
        }
    </ul>
        @foreach (var item in (IEnumerable<WebSiteLanguage>)ViewBag.WebSiteLanguages)
        {
            <div id="@item.LangName">
            @{
                Html.RenderAction("PageLanguageWiseContent",new { LangId = item.LangId });
             }

            </div>
        }
</div>

如何在一个循环中创建标签?任何其他方法,只允许我使用一个循环?

0 个答案:

没有答案