By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Declare a Web method as follows:
[System::Web::Services::WebMethod (EnableSession = true)] bool SomeFunctionToSetValue(String *someString);To set the state in an implementation of the above function, use:
get_Session()->set_Item("SomeTag",someString);Then, to retrieve the value in some other function, use:
String *str = get_Session()->get_Item("SomeTag");