Everything works fine when I run the method without including parameters
, but when the method is run with parameters
added, I get a 500 Internal Server Error
. I am not sure what I am doing wrong, thanks for any help.
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Included below is the code that I am currently using:
[WebMethod]
public static string UploadNewImage(string filePath,string ImageTitle,string ImageDescription,string ImageKeywords)
{
}
var parameters = "{'filePath':'" + fileuploadpathValue.val() + "','ImageTitle':'" +
titleValue.val() + "','ImageDescription':'" + descriptionValue.val() + "','ImageKeywords:'" +
keywordsValue.val() + "'}";
$.ajax({
type: "POST",
url: "../MainService.asmx/UploadNewImage",
contentType: "application/json; charset=utf-8",
data: parameters,
dataType: "json",
success: AjaxSucceeded,
error: AjaxFailed
});