<div data-bind="foreach: techniques"> <label> <input type="radio" data-bind="value: value, checked: $parent.selectedTechnique" /> <span data-bind="text: text"></span> </label> </div> <div data-bind="text: selectedTechnique"></div>
function ViewModel() { var self = this; self.techniques = [{ text: "ASP.NET Web Forms", value: "webforms" }, { text: "ASP.NET MVC", value: "mvc" }, { text: "ASP.NET Web API", value: "webapi" }]; self.selectedTechnique = ko.observable(""); } ko.applyBindings(new ViewModel());