All Questions
249 questions
1
vote
1
answer
750
views
How do I send a JavaScript array to a controller in a .net core 3.1 application?
The javascript side of things looks like this:
var self = this;
self.services = ko.observableArray([]);
self.saveServices = function () {
if (self.services().length > 0) {
...
3
votes
0
answers
149
views
using bootstrap 3.37 header dropdown menu and tranlsating jquery to knockoutJS
I was looking at this article to apply header menu with dropdowns in my mvc5 knockoutjs solution.
https://jdmdigital.co/news/codex/bootstrap-3-secondary-dropdown-menu/
The frontend it looks nice, and ...
0
votes
4
answers
2k
views
how to keep dropdown selected after refresh
I tried to keep retain selected item after reloading the page
this is my drop-down list
after refreshed it looks like this
I used this code for the load drop-down list
<select
data-bind=&...
0
votes
0
answers
35
views
Update knockout ViewModel when dynamic elements are added to html on btn click
I have an existing page where I have a single row with two textboxes that will accept an email and phone number. Now I need to modify this page so that users can add an additional email and phone ...
0
votes
1
answer
2k
views
Bootstrap multiselect not working with knockout binding
I am using this plugin for implementing a multi-select dropdown with checkboxes using KnockoutJs in an ASP.NET MVC web application. I have followed the code in this jsfiddle, but the drop-down is not ...
3
votes
1
answer
737
views
Display Data on Dialogbox without reloading page
am trying to display bootstrap dialog box with ID + Name + Price on it.
Then if user choose YES on the dialog, it must hit the Action method where there’s delete function and refresh the data on the ...
-1
votes
1
answer
55
views
Knockout JS - you cannot apply bindings multiple times to the same element - MVC
I am new to knockout js and dont understand why i am getting this error.
I have a view in .net mvc that when a button is clicked uses jquery to query the database with ajax and then returns data, ...
1
vote
1
answer
635
views
How to pass parameter foreach from html to controller using knockoutJs
I want parsing parameter foreach from CSHTML. using foreach from knockout.js <div data-bind="foreach: viewPjsp(1)">.
Javascipt:
function ColumnInput(Id, NameColumn) {
var self;
self = ...
0
votes
0
answers
121
views
how to toggle visibility of a div in knockout using jQuery ajax post request
Here is the JS that I coded to post the ajax request to the controller. For some reason the jquery version of hide() and show() do not work with knockout, and this is probably due the script ...
0
votes
2
answers
5k
views
How can I make a textbox readonly using jquery [duplicate]
I am using a combination of knockout and jquery and I would like to know how I can make a textbox readonly in either knockout or jquery
0
votes
1
answer
599
views
unable to get array from ajax to controller
I have an array of objects that I'm passing from view to controller using ajax.
Array data is:
My ActionMethod is:
public JsonResult AddQuestionsToStep(long stepId, string questionText, string ...
0
votes
2
answers
877
views
How to fill observable from query parameter?
I'm writing ASP.NET/MVC application. I need to fill an Knockout observable with value, which is being passed through the URL. Let's say, for instance, that I want to open the following page:
http://...
0
votes
2
answers
1k
views
Change event is called by default in page load - knockout
I am trying to save the value when user changes the dropdown option by using ajax call. This is my dropdown
<select data-bind="options: RefreshOptions, optionsText: 'Value', optionsValue: 'Key', ...
0
votes
1
answer
247
views
KnockoutJS with dynamically created partial views
I'm battling with a issue where i'm using a dynamic partial view bounding to a knockout list.
problem is that the viewmodel for the knockout list is not binding to the newly created dynamic view in ...
0
votes
2
answers
1k
views
Selectpicker after rendering
i use Knockout, and my issue is that it seems i cannot render the Selectpicker. I will jump right into some code, to help myself explain.
Scripts:
<script src="~/scripts/jquery-3.1.1.js"></...