First validate the client side data:
Since no html was provided please log your json:
var request = ...
console.log(request);
$.ajax(...)
Make sure your server side expects the right data
As of your code, the server side expects an object with a string member. So let's give it that. We will create an object representing your json object you are sending to the server:
public class ProjectedModel
{
public string ProjecteId {get;set;}
}
Now modify your method to expect this model:
public IActionResult MostrarTipusPersona(ProjectedModel model)
PS: It looks like your client side ajax method is expecting json. I would recommend removing dataType: "json" from your ajax method as the datatype will be partialhtml view. (Just receive it as a string - or expand your question so we can be sure.)
EDIT:
Passing a string value seems to be the issue then, there are two things to try:
(1)Convert the data to string with toString() method
var request = JSON.stringify(
{'ProjecteId': ($('#ProjecteId').val()).toString()
});
(2) Do it inline like this:
var request = JSON.stringify({
'ProjecteId': "'" + $('#ProjecteId').val() + "'"
});
Off course your other option would be to simply send it an integer.