I have a dictionary as follow
var selectedKeys = {
"bu": bu_keys,
"be": be_keys,
}
The bu_keys , be_keys each has a string separated with comma.
Example:
possible value for bu_keys is: "12354,abccsd,dsdfdlk,d35487"
when i send this to my controller i got only the first part of the string which is 12354
$.ajax({
url: "@Url.Action("Download", "Reports")",
dataType: "json",
type: "POST",
data: { allKeys: selectedKeys },
success: function (selectedKeys) {
//do nothing
},
error: function (xhr, status, error) {
alert("Error: Please refresh the page and try again!" + status + " " + error + " " + xhr.status + " " + xhr.statusText);
}
});
public FileResult DownLoad(Dictionary allKeys)
{
// code here
}
public FileResult DownLoad2(Dictionary allKeys)
{
// code here
}
How can i get all the string not only the first part of the string, i tried both actions Download and DownLoad2, with no success