I just find that the problem is not related to the webmethod.
It is caused by another problem.
I set the Session["PhotoId"]
in a normal aspx.
But I can't retrieve value in the webMethod
of the aspx page.
[WebMethod(EnableSession=true)]
public static string Submit(string data1, ...)
{
string test = HttpContext.Current.Session["PhotoId"]; // test is null
}
What should I do?