'System.Web.UI.WebControls.ListItem' in Assembly is not marked as serializable
<p>I have made a property, which looks like below.</p>

<pre><code>public ListItem[] DropDownListItems
        {
            get { return (ListItem[])ViewState["DropDownListItems"]; }
            set { ViewState["DropDownListItems"] = value; }
        }
</code></pre>

<p>And this is how i assign it values</p>

<pre><code>ListItem[] litem = new ListItem[7];
litem[0] = new ListItem("View", "RowView");
litem[1] = new ListItem("ReadView", "RowReadView");
litem[2] = new ListItem("WriteView", "RowWriteView");
litem[3] = new ListItem("DeleteView", "RowDeleteView");
this.DropDownListItems=litem;
</code></pre>

<p>But I get the following error</p>

<p><strong>'System.Web.UI.WebControls.ListItem' in Assembly is not marked as serializable.</strong></p>

<p>How to resolve it</p>
