By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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");