如何将 html img属性值从视图发送到控制器?
<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;">
@if (Model == null)
{
<img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" />
}
else
{
if (!String.IsNullOrEmpty(Model.Sender.Logofile))
{
<img src="~/Content/img/Company/LogoFiles/@Model.Sender.Logofile" id="logoimg"/>
}
}
</div>
<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>
<div>
<span class="btn btn-file"><span class="fileupload-new">Select image</span><span class="fileupload-exists">Change</span>
<input type="file" id="LogoFileUp" name="LogoFileUp" size="19" style="opacity: 0;" data-form="uniform" required="required" /></span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
</div>
我想检查是否有 img logoimg的价值?我怎样才能做到这一点?提前致谢。