locked
A Suggestion: Nice way to define properties with StateContainer Attribute RRS feed

  • Question

  • User-2043637356 posted

    [StateContainer(ViewState)]

    string FirstName
    {
    get;
    set;
    }

    [StateContainer(Session)]
    List<string> myList
    {
    get;set;
    }

    [StateContainer(Cache)]
    List<string> myList2
    {
    get;set;
    }

    Just a random thought: I think it would be nice, with the help of an attribute, to be able to define where a given property would be stored.  A change probably best fit for an upcoming Framework release.

    Just a thought.

    Tuesday, December 18, 2012 2:59 PM

Answers

  • User-166373564 posted

    Hi Nauman

    Thanks for your support to our ASP.NET Forums.

    It is very appreciated to share your idea to us. It will be helpful for Microsoft develop team to improve our products better.

    Moreover, you could also give a idea in our asp.net uservoice here(http://aspnet.uservoice.com/forums/41199-general-asp-net),

    and welcome to post your ideas and questions on ASP.NET Forums in your future programming.

    Kind regards

    Angie xu

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 27, 2012 3:11 AM
  • User-1555788080 posted

    Hi Nauman,

    Also it will be great if we can store session data both in inproc and out of process at a time similar to mixed mode session support. So that only crutial session data will be persisted out of process and some non crutial or temp ( depending on situation ) can be stored in InProc.

    This support will be utilized by non web farm or web garden architecture.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 27, 2012 4:54 PM

All replies

  • User-166373564 posted

    Hi Nauman

    Thanks for your support to our ASP.NET Forums.

    It is very appreciated to share your idea to us. It will be helpful for Microsoft develop team to improve our products better.

    Moreover, you could also give a idea in our asp.net uservoice here(http://aspnet.uservoice.com/forums/41199-general-asp-net),

    and welcome to post your ideas and questions on ASP.NET Forums in your future programming.

    Kind regards

    Angie xu

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 27, 2012 3:11 AM
  • User-1555788080 posted

    Hi Nauman,

    Also it will be great if we can store session data both in inproc and out of process at a time similar to mixed mode session support. So that only crutial session data will be persisted out of process and some non crutial or temp ( depending on situation ) can be stored in InProc.

    This support will be utilized by non web farm or web garden architecture.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 27, 2012 4:54 PM