Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
7
Reply
Dropdownlist Value not Save in Database
chiranjit das
Feb 24 2016 2:05 AM
427
Reply
Sir,
I was create a webpage the dropdown list value are save in database is undefined
i have attach my code
$(document).ready(function () {
$('#btnSave').click(function () {
var name = $("#txtDesignationName").val();
var code = $("#txtCode").val();
var grade = $("#ddlGrade").val();
var Division = $("#ddlDivision").val();
var Department = $("#ddlSelectDepartment").val();
var Heads = $("#txtHeads").val();
$.ajax({
type: 'POST',
contentType: "application/json; charset=utf-8",
url: 'Designation.aspx/Insert_Data',
data: "{'name':'" + name + "','code':'" + code + "','grade':'" + grade + "','Division':'" + Division + "','Department':'" + Department + "','Heads':'" + Heads + "'}",
async: false,
success: function (response) {
$("#txtDesignationNam").val("");
$("#txtCode").val("");
$("#ddlGrade").val("");
$("#ddlDivision").val("");
$("#ddlSelectDepartment").val("");
$("#txtHeads").val("");
alert("Record saved successfully..!!");
},
error: function () {
alert("Error");
}
});
});
});
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
how to create simple mvc CRUD in asp.net using json
How To Set Github