'JQuery FileDrop.js How To Read Data Params in Controller?

Using ASP.NET MVC 5, I'm having trouble reading the param data I am sending from my filedrop jquery code into my controller.

Here is my .cshtml filedrop code:

enter image description here

And here is my Controller code, showing that param1 is being passed as null:

enter image description here



Solution 1:[1]

You can try defining a variable that will hold that the value of attribute. like this

var idValue = $('id').val();

And then pass this variable to the data.

data: { params: idValue }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 harrysrangal