0

I want to insert an imege to a MVC Project, i used following code to do that, but i want to pass that image using jquery instead of pass data using Html.BeginForm. how can i do it,

    <% using (Html.BeginForm("uploadImage", "ItemMaster", FormMethod.Post, new { enctype = "multipart/form-data" }))
      {
    %>
        <p><input type="file" id="fileUpload" name="fileUpload" size="23"/> </p>
        <p><input type="submit" value="Upload file" /></p>

        <%= Html.Hidden("hdnItemCode", null, new { style = "width:100px" })%>
    <% 
       } 
    %>
Kasun Wanniarachchi
  • 423
  • 3
  • 7
  • 18

1 Answers1

0

If you're looking for a method to upload a file via jQuery, I suggest this question and answers.

Community
  • 1
  • 1
David Fox
  • 10,603
  • 9
  • 50
  • 80