$('#ddlSDIDepositSchedule').change(function () {
alert($("#ddlSDIDepositSchedule").val());
});
http://jsfiddle.net/rahularyansharma/KSwcd/
$('#ddlSDIDepositSchedule').change(function () {
alert($("#ddlSDIDepositSchedule").val());
});
<p><input data-bind="value: firstName"></p>
<p><input data-bind="value: lastName"></p>
<p><input data-bind="value: fullName"></p>
<p> <span data-bind="text: upperFullName"> </span> </p>
And ViewModel is as follow :
function AppViewModel() {
var self = this;
self.firstName = ko.observable('rahul');
self.lastName = ko.observable('sharma');
self.fullName = ko.computed(function() {
return self.firstName() +' ' + self.lastName();
});
self.upperFullName = ko.computed(function() {
return self.fullName().toUpperCase();
});
}
// Activates knockout.js
ko.applyBindings(new AppViewModel());
JS FIDDLE LINK
Here is html for binding of computed properties
<p><input data-bind="value: firstValue"></p>
<p><input data-bind="value: secondValue"></p>
<p><input data-bind="value: addValue"></p>
and here is js fiddle linkfunction AppViewModel() { var self = this; self.firstValue = ko.observable(6); self.secondValue = ko.observable(5); self.addValue = ko.computed(function() { return parseInt(self.firstValue()) + parseInt (self.secondValue()); }); } // Activates knockout.js ko.applyBindings(new AppViewModel());
First name:
Last name:
function AppViewModel() {Here is output window screen and link of js fiddle
this.firstName = ko.observable("Rahul");
this.lastName = ko.observable("Sharma");
}
// Activates knockout.js
ko.applyBindings(new AppViewModel());
function AppViewModel() {
this.firstName = "Rahul";
this.lastName = "Sharma";
}
// Activates knockout.js
ko.applyBindings(new AppViewModel());
showNotification("Success!", "Deduction Detail Saved !", "notice", "br");
// displays Growl notifications
function showNotification(title, msg, type, location) {
switch (type) {
case "error":
$.growl.error({ title: title, message: msg, location: location });
break;
case "notice":
$.growl.notice({ title: title, message: msg, location: location });
break;
case "warning":
$.growl.warning({ title: title, message: msg, location: location });
break;
default:
$.growl.notice({ title: title, message: msg, location: location });
break;
}
}
$.ajax("yourpagename.aspx/webmethodname", {
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: JSON.stringify({ objDeduction: deductionPageState }),
dataType: 'json'
})
.done(function(data) {
if (data.d) {
clearDeductionPage();
hideLoader();
showNotification("Success!", "Deduction Detail Saved !", "notice", "br");
callback(data);
} else {
getRecentErrors(function(data) {
hideLoader();
showNotification("Error!", "Error in Saving Deduction Details !\n" + data.d.Message, "error", "br");
});
}
})
.fail(function(xhr, err, msg) {
hideLoader();
handleError(xhr, err, msg);
});
Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...