@foreach (var panelGroup in Model.GetPanelGroups())
{
<div id="sm-form-group-@panelGroup" class="form-inline grid-options">
<!-- subtitle -->
<h3>@DashboardExtensions.GetPanelGroupName((int)panelGroup, Model.GetPluginNameForPanelGroup((int)panelGroup)) @Resources.StringPanels</h3>
<div class="tile-options">
@foreach (var preference in Model.GetPreferenceForGroup((int)panelGroup))
{
<div class="tile-group" data-tiletype="@preference.Panel">
@Html.CheckBoxFor(m => m.Values[(int)preference.Panel], new { @id = String.Format("id-sm-checkbox-dashboard-{0}", (int)preference.Panel) })
@Html.HiddenFor(m => m.PluginIds[(int)preference.Panel], new { @id = String.Format("id-sm-hidden-pluginId-{0}", (int)preference.Panel) })
@Html.HiddenFor(m => m.PanelIds[(int)preference.Panel], new { @id = String.Format("id-sm-hidden-panelId-{0}", (int)preference.Panel) })
<label for="id-checkbox-dashboard-@preference.Panel">@preference.Panel</label>
</div>
}
</div>
</div>
}
在此代码中,{DB}将从ID中检索@preference.Panel
。我需要根据标签部分中显示的ID从资源文件中选择值。
像
的String.Format(@ Resources.preference_ {0},@ preference.Panel)。
有没有解决方案?