Can you return cookies when returning an MVC2 Json result?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes – Not via the json result but you can simply add in your same controller method Response.Cookies.Add() and they will be added.
Note: that in the an Async action you will need to set the response cookie in the completed method.