JS
var arrSpecialInstructions = [];
arrSpecialInstructions.push("sder");
arrSpecialInstructions.push("vfgtr");
$.ajax(
{
url: "/PetBooking/CreditCardBookingProcess/",
data:
{
'arrSpecialInstructions': JSON.stringify(arrSpecialInstructions)
},
type: 'POST',
success: function (data, status, xhr) {},
error: function (xhr, textStatus, errorThrown) {}
});
Action method
[HttpPost]
public ActionResult CreditCardBookingProcess(string arrSpecialInstructions)
{
var specialInstructionsArray = arrSpecialInstructions.Split(',');
}
I just need to retrieve the comma separated string array.But it gives as below.How can I get just simple string array like this sder,vfgtr after splitting it.At this moment it's having lots of other characters.
