Questions tagged [knockout-mvc]

Knockout MVC is a web framework for ASP.NET MVC based on the popular Knockout.js JavaScript library. It allows easy creation of feature-rich applications based on Model-View-View Model (MVVM) pattern.

Knockout MVC is a web framework for ASP.NET MVC based on the popular Knockout.js JavaScript library. It follows the Model-View-View Model (MVVM) pattern, in which the user interface can be bound to a separate existing data model such that any change of the model will automatically update of interface.

Knockout MVC follows the concepts of the Knockout.js library, but uses server-side .NET classes as models instead of JavaScript as used by plain Knockout.js. Knockout MVC allows the creation of Rich Applications without the need to write JavaScript by dynamically generating some JavaScript on the server based on C#/VB.net code, and by using more server-side processing.

273 questions
4
votes
1 answer

How to set the minimum length of text so that the knockout autocomplete control is shown?

I am using PerpetuumSoft.Knockout library to bind autocomplete to textbox in my asp mvc application as follow: var myCustomBinding = "..."; var text = knockoutHtml.Hidden(); text.Items.Add(new KnockoutBindingStringItem("autocomplete",…
ElConrado
  • 1,477
  • 4
  • 20
  • 46
4
votes
1 answer

KnockoutMVC submit button not working

I am using knockoutmvc to bind controls.(http://knockoutmvc.com/) I am getting following error while clicking on button. Following is my Razor view implementation : @using PerpetuumSoft.Knockout @model OpManWeb.ViewModel.ManageAddressVM @{ var…
Aditya Raval
  • 590
  • 4
  • 20
4
votes
2 answers

Is it possible to "inject" updates into a Knockout ViewModel?

I'm currently looking for a solution to my issue: In our ASP.NET MVC application there are pages that are used for realtime data visualization of industrial devices. When the page gets loaded, a loading icon is shown while I fetch the viewmodel data…
Rob
  • 11,492
  • 14
  • 59
  • 94
4
votes
1 answer

Knockout MVC model binding in Partial Views

I'm using Knockout MVC. In my page I render several Partial View. In each partial view i pass a model, that is submodel for main. And i'm getting an error 'Uncaught Error: You cannot apply bindings multiple times to the same element.' Here's some…
Yury Tarasyuk
  • 51
  • 1
  • 6
4
votes
1 answer

Disabling/Removing Select Options created via a Knockout options binding

I have a series options a user can choose, which I am able to track via an observable array. The array itself is fed from a Model which I bring in to knockout via the Knockout Mapping extension (ko.mapping.fromJS). Everything is working fine.…
Ta01
  • 31,040
  • 13
  • 70
  • 99
4
votes
3 answers

Using two Knockout view models for one page

I'm setting up two view models in knockout. $.getJSON("/api/administrators", function (data) { var AccessViewModel = { administrators: ko.observableArray(data) }; …
rross
  • 2,236
  • 11
  • 36
  • 41
3
votes
1 answer

Knockout: foreach not working with asp.net mvc

I know this might be easy but somehow I'm unable to implement foreach for a knockout binding. The code is as below: @{ Layout = "~/Views/Shared/_Layout.cshtml"; } @section scripts {