I have use this code for change password .Bu i have face null value in data.
- <script type="text/javascript">
- $(document).ready(function () {
- debugger;
- $('#EditPasswordBtn').click(function (e) {
- e.preventDefault();
- var data = {
- "newPassword": $("#newPassword").val(),
- "confirmPassword": $("#confirmPassword").val()
- };
- $.ajax({
- url: '/Login/ChangePassword',
- type: "POST",
- data: JSON.stringify(data),
- cache: false,
- dataType: "json",
- contentType: "application/json",
- success: function (response) {
- },
- error: function (error) {
- alert.success(error.Message);
- }
- });
- });
- });
- </script>
- try
- {
- obj_userMaster.UserPassword = changePassword.NewPassword;
- }