Emergency - Is the grammar correct?
I want to add Info structure to ArrayList. My goal is ViewState["ds"] = List;
Please Help Me.
1. Originally, I wanted to add List to ViewState. However, there was a Serialize error.
2. So I tried to add to ViewState by converting List to ArrayList. However, ListArray is not added to ViewState either.
How to add to ViewState ? I need to add Info structure column to ViewState.
I want to add Info structure to ArrayList. My goal is ViewState["ds"] = List;
Please Help Me.
1. Originally, I wanted to add List to ViewState. However, there was a Serialize error.
C#:
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;
2. So I tried to add to ViewState by converting List to ArrayList. However, ListArray is not added to ViewState either.
How to add to ViewState ? I need to add Info structure column to ViewState.
C#:
class Info
{
public string ORDER_ID { get; set; }
public string ORDER_STATUS { get; set; }
}
ArrayList arr1 = new ArrayList(4);
Info Info = new Info();
for (int i = 0; i < 5; i++)
{
Info.ORDER_ID = "1";
Info.ORDER_STATUS = "Complite";
arr1.Add(Info);
}
ViewState["ds"] = arr1;
Last edited by a moderator: