I am following a tutorial and I am stuck
I am trying to upload an image using C# MVC. Although the issue appears to be only in the HTML.
My HTML is
<form action="/Admin/UploadImage/" enctype="multipart/form-data" onsubmit="AJAXSubmit(this);return false;" method="post">
<dl>
<dt>
<label for="FileUpload_FormFile">File</label>
</dt>
<dd>
<input id="FileUpload_FormFile" type="file"
name="FileUpload.FormFile" />
</dd>
</dl>
<input class="btn" type="submit" value="Upload" />
<div style="margin-top:15px">
<output name="result"></output>
</div>
</form>
If I click the Choose File
option and select an JPG image, Visual Studio stops. I don’t even click the submit button!! I have to reclick the start button in visual studio to restart IIS-Express. And this issue occurs every time I chose an image to upload!
The same issue happens with jpg, png (even small files of 50kb)
Because of this I don’t see any error message or exception.
I’m totally lost. I don’t know how to progress this at all