0

I have been trying the following code to create a session

@{string Session.UserId = "32";}

No matter what I change it shows an error (right now "expected ;"). What is the right way to create a session variable? I dont mind creating a string or an int or a boolean. I am basically trying an integer.

4

1 回答 1

3

这边走:

@{
  Session["UserId"] = "32";
}
于 2013-10-23T14:02:56.657 回答