Hi,
i am using asp.net using C# ,Jquery ajax and webmethods to save data to database.here is my sample code
get all control values here like
var add = $("#txtaddress").val();
$.ajax({
type: "POST",
url: "A.aspx/SaveDATA",
data: "{'id':'" + id + "','CountryId':'" + Country + "','CityId':'" + City + "','Area':'" + Area + "','LM':'" + LM + "','Lat':'" + Lat + "','Lon':'" + Lon + "','add':'" + add + "','KW': '" + KW + "','cName': '" + companyName + "','pCode':'" + pCode + "','catId':'" + catId + "','isEdit':'FALSE','email':'" + email + "','url':'" + url + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
//sucess
}
});
This is working fine.Now i know that these are client side controls and we can not upload image as there is no form submit.so save this data and image is not possible here.i also know that there are some plugins that save image either on ifram or ashx file but they do not save data like above.
I need help here how to make a senareo where we can save both in one request to database?like i want if we define a function on file upload change and save its result in any html control...then will be easy to get.i want image and this data all in on webmethod function
thanks in advance