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 PalanivelPosted Mar 28, 2017, 10:45 AM
Dr.Ajay KashyapPosted Mar 30, 2017, 1:23 AM
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/
Dr.Ajay KashyapPosted Mar 28, 2017, 12:51 PM
Ramesh PalanivelPosted Mar 28, 2017, 11:09 AM
Dr.Ajay KashyapPosted Mar 28, 2017, 10:41 AM
Ramesh PalanivelPosted Mar 28, 2017, 10:29 AM