我正在制作管理员布局。我有局部视图,我有图像。当我点击图像时,图像显示在页面底部,不显示为弹出窗口。但是当我将它们置于普通视图中时,它会显示在弹出窗口中。我是编码新手,对CSS还没有深入了解。
当我在普通视图中点击它们时,如何在局部视图中看到弹出窗口中的图像?
我的部分查看代码:
@model Urun
<div class="onecolumn">
<ul class="media_photos" >
@foreach (var item in Model.Fotolar.ToList())
{
<li style="margin-bottom:10px">
<div style="height: 122px; margin-bottom:20px !important; width: 102px;text-align:center">
<a rel="slide" href="~/UrunFotolari/Buyuk/@item.FotoPath" title="@Model.Ad">
<img src="~/UrunFotolari/Kucuk/@item.FotoPath" alt="@Model.Ad" />
</a>
<a href="../FotoSil?id=@item.Id&urunId=@Model.Id">
<img style="border:none; height:20px;width:20px;" src="/Content/Admin/images/icon_delete.png" alt="delete" /></a>
</div>
</li>
}
</ul>
<br class="clear" />
@using (Html.BeginForm("FotoKaydet", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input type="file" multiple="multiple" accept='image/*' name="fotolar" value="" />
if (ViewBag.FotoHatasi != null && (bool)ViewBag.FotoHatasi)
{
<div class="alert_warning">
<p>
<img src="~/Content/Admin/images/icon_warning.png" alt="success" class="mid_align" />
Bir fotoğraf seçin.
</p>
</div>
}
<input type="hidden" name="urunId" value="@Model.Id" />
<input type="submit" name="name" value="Kaydet" />
}
</div>
和我的控制员:
public ActionResult FotoIndex(int id = 0, bool hataVar = false)
{
Urun urun = db.Urunler.Find(id);
if (urun == null)
return View("_Hata");
ViewBag.FotoHatasi = hataVar;
return View(urun);
}