【发布时间】:2014-01-30 17:33:02
【问题描述】:
我正在从复选框列表中将一些值放入我的 div 类中。 When one check box is selected it works as it should be but when two or more check boxes are selected it puts the " , " in between each value when the code is executed e.g Class="class1,class2 element".所以问题是,我怎样才能用两个类之间的空格替换“,”?以下是我的代码:
@{
var playerHref="http://player.vimeo.com/video/";
}
<!--gallery start-->
<div id="container" class="grid_12 isotope">
@foreach (LoopItem i in GetLoop("ItemPublisher:Items.List")){
<div id="box" class="@i.GetValue("ItemPublisher:Item.checkboxes") element">
<a href="@playerHref@i.GetValue("itempublisher:Item.Vimeoid")" rel="Shadowbox;height=540;width=960" target="_blank">
<img id="box-img" src="@i.GetValue("ItemPublisher:Item.GalleryImage")" title="play" alt="play">
</a>
</div>
}
</div>
<!--gallery ends-->
【问题讨论】:
标签: c# razor str-replace