How To pass Image File And Some Data From Using Ajax to Mvc Controller ..i am able to pass from data but image not pass.. What To Do Give Below IS my Code ..
This Is Html code :-
@Html.Label("First Name")
@Html.Label("Last Name")
@Html.Label("Email Id")
@Html.TextBox("EmailId", "", new { @class = "form-control", type = "email" })
@Html.Label("Profile Image")
This Is My Ajax :-
var myformdata = $("#myForm").serialize();
$.ajax({
type: "POST",
url: "/Business/UserRegistration",
data: myformdata,
success: function () {
$("#loaderDiv").hide();
$("#myModal2").modal("hide");
}
})
This Is My Controller :-
[HttpPost]
public ActionResult UserRegistration(RegistrationViewModel myformdata)
{
}


Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 28, 2017, 6:45 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 28, 2017, 6:29 AM EDT
Dr.Ajay KashyapRank #2,900 · 496 reputationPosted Mar 28, 2017, 6:41 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 28, 2017, 7:09 AM EDT
Dr.Ajay KashyapRank #2,900 · 496 reputationPosted Mar 28, 2017, 8:51 AM EDT
Dr.Ajay KashyapRank #2,900 · 496 reputationPosted Mar 29, 2017, 9:23 PM EDT
Ramesh Palanivel Sir i have done with the help of this code
http://www.c-sharpcorner.com/UploadFile/manas1/upload-files-through-jquery-ajax-in-Asp-Net-mvc/