Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COI very much dislike people voting questions or answers down without providing an explanation, so I voted you back up. I am getting the following error when I do this: "This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet." I checked it out, and added it, but it doesn't change anything. Also there were some security issues that conserned me with enabling AllowGet as the message suggested. Can you suggest any alternatives. Thanks for your answer.
      singulars
    2. COAdding JsonRequestBehavior.AllowGet should help. My test code is the same as above, only changed the type of param to String and the final line to return Json(new { Value = param }, JsonRequestBehavior.AllowGet), which runs without error. On security: Sure, there is a reason why JsonResult does not allow GET by default. You can check the Request.HttpMethod to ensure POST before returning the JsonResult.
      singulars
    3. COAdmittedly, the solution I provided may not look absolutely clean, and there may be concerns, perhaps best addressed already in the original answer. Personally, I don't mind the different actions in your original solution, and I would stick with them for several reasons, maintainability being one, separation of concerns being another, but I did not want to judge what you are attempting with limited information. I agree that if anyone think my way is bad in approach, they should let me know why, so that I may better myself. Thanks for voting me back up.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload