Resolved This is the opposite question of ViewState .

patrick

Well-known member
Joined
Dec 5, 2021
Messages
256
Programming Experience
1-3
C#:
[Serializable]
        class Info
        {
            public string ORDER_ID { get; set; }
            public string ORDER_STATUS { get; set; }
        }
                List<Info> List1= new List<Info>();
                Info AssignInfo = new Info();     
                for (int i = 0; i < 5; i++)
                {
                         Info.ORDER_ID = "1";
                         Info.ORDER_STATUS = "Complite";
                          List1.Add(Info);
                }
                 ViewState["ds"] = List1;


Is the grammar below correct?

C#:
  List<Info> lstNoAssign = (List<Info>)ViewState["NoAssignInfoList"];
                List<Info> dtOrgAssign = (List<Info>)ViewState["AssignInfoList"];
 
If the compiler compiles the code without errors, the syntax is correct. The issue you have in you other thread is a runtime problem.

Remember there is a difference between compile time where syntax matters, and runtime where logic, design, and environment matter.
 
If the compiler compiles the code without errors, the syntax is correct. The issue you have in you other thread is a runtime problem.

Remember there is a difference between compile time where syntax matters, and runtime where logic, design, and environment matter.

Thank you so much for your teaching. The problem has been resolved.
 

Latest posts

Back
Top Bottom