Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have this:
$.getJSON("https://scyk.pl/Account/GetSid").done(function (sid) { settings.parameters.sid = sid; });
And this:
public JsonResult GetSid() { return Json(SomeString); }
.done function of jquery is not executing - why?
settings.parameters.sid
console.log("done")
Use the override of Json that takes a JsonRequestBehavior option and set that to AllowGet
Json
JsonRequestBehavior
AllowGet
return Json("string", JsonRequestBehavior.AllowGet);
To only allow post requests, change your controller action to this:
[HttpPost] public JsonResult GetSid() { return Json(SomeString); }
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
settings.parameters.sidis null, also if I putconsole.log("done")in there, nothing happens