All Questions
211 questions
0
votes
2
answers
69
views
Does Javascript have deferred collection APIs like .NET LINQ?
I know Javascript Array has map, filter and the like, and reduce can be used as a way merge them (though I really dislike the syntax, it does work). However, a simple example below can prove that it ...
0
votes
2
answers
140
views
How can I pass JS arrays to C# webforms?
<head runat="server">
<title></title>
<script>
const array1 = ["Saab", "Volvo", "BMW"];
</script>
</head>
&...
0
votes
0
answers
116
views
JSTree not populating properly from JSON Array. If I return a single String it works but not from my Array. Where am I going wrong?
I have been trying to get this working for days but failing. If I return a single string using this format from C#:
"{ \"id\": \"" + libraryName + "\", \"parent\...
0
votes
2
answers
146
views
Data binding from Javascript returns empty array in C#
In console.log I can see the array is not empty,as well it's shown on the image below. However, when I send the data to the endpoint the array is 0. I notice the other element MaterialId has value, so ...
-1
votes
3
answers
144
views
How to calculate no of days based on dates
so this is regarding the picture below where the flights are flying from origin and destination. What I am unable to understand is how the days are calculated, meaning how we are saying that a flight ...
0
votes
1
answer
80
views
Passing Id and User Selected Value to the JavaScript from Model List
In my web application, there is a section where I load the values from the model using For loop
So I added a button to trigger the script.
I want to know how to get the model data EmpMarks to the ...
0
votes
0
answers
47
views
Looking for similar kind of implantation which I have given into C#
const unique = array.map(item => item.age).filter((value, index, self) => self.indexOf(value) === index)
Does anyone know the similar kind of implementation in C#?
1
vote
2
answers
965
views
Passing a string array from JS to C# controller
I have an array in JS ( var selectedEmails = []; )
After I collect the selected Emails from a grid, I call a GET to C# controller:
$.ajax({
type: 'GET',
url: '@Url.Action(&...
0
votes
0
answers
69
views
Unexpected token '&' while reading json object as string in javascript
I have a model which will read a json object as a string.
string zipCodes = "[{'zip': '06854','market_area': 'R01','state': 'CT'},
{'zip': '06842','market_area': 'R01','state'...
0
votes
3
answers
196
views
How to calculate an array of timed slots with varying priority from an array of raw priority-range data-items with overlapping time-ranges?
I have a set of data that has the following interface
interface data {
start: double
end: double
priority: number // (1 | 2 | 3)
}[]
As an output, I want to see the range of priority over the ...
0
votes
2
answers
141
views
How to pass a 2d array of numbers to my .Net controller?
I have a 2d javascript array like this
[[2,3],[13,4],[1,19]]
and I want to pass it to my .Net controller
My controller header looks like this
public async Task<ActionResult> UpdateOrder(int[,] ...
0
votes
6
answers
349
views
Algorithm to split a multi-point line (array of coords) into an array of line segments
Sorry if this is kind of confusing but I've been stuck on this for a long time. I'm working on a mapping application with lat/lng coordinates. To simplify it, I'll use whole numbers.
Let's say I have ...
1
vote
0
answers
344
views
Display image returned as byte array from MVC controller through ajax request
I'm receiving a file object from an MVC controller as FileContentResult:
[HttpPost]
public IActionResult Export(RequestModel request)
{
// Taking file entity fromdb
...
0
votes
3
answers
556
views
Convert array of key objects pair to a C# object
I have a api that return data in this format
{ "reult":
{ "70":
{
"type_id": 3,
"type": "forex",
"group_title&...
1
vote
2
answers
2k
views
Receiving arrays in asp.net core web api form axios.post
For example I have this code, that sends data to the asp.net core 6 web api controller.
const formData = new FormData();
formData.append("Id", 1);
formData.append("PhotoNames", [&...