Hi sir,
i have a web form from there i have to save data into database
using ajax and jquery i have 4 text box and 2 dropdown list
the problem is that i am unable to get the value from dropdown
i am an attaching the code for same
thanks in advance
$(document).ready(function () {
$('#wpneoprofilesave').click(function () {
var userpro = {};
userpro.Name = $("[id*='txtpname']").val();
userpro.Email = $("[id*='txtpemail']").val();
userpro.Profession = $("[id*='txtprofesstion']").val();
userpro.Contactno = $("[id*='txtcontact']").val();
userpro.InvestmentCapacity = $("[id*='txtpinvestment']").val();
userpro.PropertyType = $("#ddlproptype").val();
userpro.PropertyStatus = $("#ddlpropstatus").val();
$.ajax({
url: 'UserProfileService.asmx/AddEmployee',
method: 'post',
data: '{userpro: ' + JSON.stringify(userpro) + '}',
contentType: "application/json; charset=utf-8",
success: function (response) {
console.log(response);
},
error: function (err) {
console.log(err);
}
});
});
});
</script>