I have a variable:
var id = $(Person).val();
this ID I wanted to use in a session variable, but I tried to do it like this:
@Session["Person"] = id;
Why don't you send this id to the controller using json and put it in a viewbag, and use it in the view?