I am using this code with the help of one tutorial, but still i am unable to upload the image, i mean the image is not appearing, please someone help me on this
This is the code I have used:-
<div class="col-md-6">
<div class="form-group">
@Html.LabelFor(model => model.ImgPath, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<img src="@Url.Content(Model.ImgPath)" style="margin:10px" height="200" width="200" id="imagePreview" />
<input type="file" name="ImageUpload" accept="image/jpeg, image/png" onchange="ShowImagePreview(this, document.getElementById('imagePreview')" />
</div>
</div>
</div>