问题描述:

from my controller I want to assign a value to an application variable much like I would a session variable.

I assumed I could just use:

Application("MyValue") = "test"

网友答案:
HttpContext.Application["MyValue"] = test
网友答案:

If you are trying to use this to pass data from the controller to the view, use the ViewData.

ViewData("MyValue") = "test"

If not, please give more context as to what you are trying to accomplish.

相关阅读:
Top