[WebMethod]
public static void SetTheme(string theme)
{
Guid studentIdentifier = SessionData.LoggedInUser.Identifier;
Student student = (Student)ItemFactory.GetItem(studentIdentifier);
student.Theme = theme;
}
И я хочу изменить файл cookie, который также называется «тема», в конце этого WebMethod. Как я могу это сделать? Печенье должно быть установлено здесь, а не через JavaScript. Это требование. СпасибоКак изменить значение cookie из WebMethod?
Вы правы, мне пришлось использовать: HttpContext.Current.Response.Cookies ["theme"]. Value = theme; Спасибо. –