Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
private List<AcoTransaction> AcoTrans
   {
       get
       {
           if (ViewState["AcoTransaction"] != null)
           {
               ViewState["AcoTransaction"] = new List<AcoTransaction>();
           }
           return (List<AcoTransaction>)ViewState["AcoTransaction"];
       }
       set
       { ViewState["AcoTransaction"] = value; }
   }


how to save data on this class object on clicking on submit button and read the data from it. Please help me.
Posted
Updated 15-Dec-13 2:30am
v2
Comments
Pheonyx 15-Dec-13 6:55am    
This observation isn't related to answering your question, but shouldn't your if check be: == and not != else your get will be clearing out the data each time it has a non null value.

With regards to your question, what have you tried?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900