All Questions

1
vote
1answer
100 views

Can I use the model from an MVC partial view in my Knockout viewmodel in the main view?

I am currently working on a view that has several partial views within in, which might also have partial views in them. I have set up a Knockout viewmodel for the entire view, which also covers the ...
0
votes
2answers
1k views

Connecting MVC Model View with associated Knockout.js ViewModel

Background: I'm pretty new to MVC & Knockout.js but I am trying to get up to speed on these technologies. I am using MVC 5 with EF6 and Knockout.JS 3.2. I have a Detail view that pulls a "...
1
vote
1answer
1k views

File uploading with KnockoutJS and ASP .Net MVVM

Does anyone have experience with ASP .Net MVVM and Knockout JS. In my application, I need to allow users to upload files. I find it difficult to find examples or any documentation online that will ...
0
votes
1answer
456 views

knockout js binding limitation on complex view model

I am 3 months into learning KnockoutJS and it has been great so far. However, I am facing an issue with binding. This is the scenario: I am using MVC with KO. MVC model is passed down to the view, ...
0
votes
1answer
2k views

DataTables + KnockoutJS: “No data in the table” and sorting issues

As I've mentioned in the following question: How do I pass an ID from View to the ViewModel as a parameter for GET function? I'm developing an MVC application, using MVC4, knockoutJS, Web API, ...
3
votes
1answer
603 views

How do I pass an ID from View to the ViewModel as a parameter for GET function?

I'm creating a project using MVC, knockoutJS, Web API, Bootstrap and so forth, the database in use is MSSQL Server 2012. It's all working very well, the controllers have properly created CRUD ...
1
vote
0answers
370 views

DropDown list issue in knockout js asp.net mvc 3

I have the following problem. I'm developing web application on asp.net mvc and using KnockoutJS in one of views. I have the following viewmodel public class ExampleViewModel { public ...
3
votes
2answers
2k views

MVC validation lost in Knockoutjs post

I'm using MVC4 and knockout. I have a form on a page that is strongly typed to a viewmodel. In that viewmodel I have some validation defined, for instance: [Required(ErrorMessage = "Title is required"...
1
vote
1answer
3k views

Knockout view model posts back to ASP.NET MVC partially - how to post back complete object?

Having these ASP.NET MVC view models: public class User { public string Name { get; set; } public LabeledEmail LabeledEmail { get; set; } } public class LabeledEmail { public IList&...
0
votes
1answer
921 views

ASP.NET with Knockout variable length list with combobox - how to bind?

With the following ASP.NET models public class User { public string Name { get; set; } public LEmail LEmail { get; set; } } public class LEmail { public IList<CLabel> Labels; ...
6
votes
2answers
2k views

ASP.NET MVC with nested view model and Knockout

Cannot get my brain around how to implement knockout for the following ASP.NET MVC 4 nested view model : public class MyProfile { public string Name { get; set; } public IList<VM1> List1 ...
0
votes
1answer
3k views

How to use Knockout.js in asp.net mvc Razor correctly and sufficiently?

i try to learn knockout.js on asp.net mvc razor. i have been coding below code to learn and test myself But View side throws me a js error. Error occurs on "var model = @Html.Raw(Json.Encode(Model));"...
1
vote
1answer
151 views

Inserting Collections to Models with jQuery and ASP.NET MVC, creating plugin

After looking at the available options, I'm looking at making a plugin for jQuery (and coincidentally, a library for ASP.NET MVC) that will provide some simple methods for dynamically adding objects ...