Do you know LosFormatter ?
Stoneware in the obscurity of System.WEB.UI the class LosFormatter is hiding. ASP.NET uses this class to serialize web controls state into string presentation inside hidden field inside the page Form. ASP.NET also uses LosFormatter on post back to de-serialize the hidden field back into controls. The class advantage is that it optimized for highly compact ASCII format serialization. This class supports serializing any object graph, but is optimized for those containing strings, arrays, and hashtables.
If you have any need to serialize object into text (to transfer the object between pages, for example) you can use that class:
//Send Page
System.Collections.ArrayList oArr = new System.Collections.ArrayList();
oArr.Add("a");
oArr.Add("b");
oArr.Add("c");
System.Web.UI.LosFormatter oLF = new System.Web.UI.LosFormatter ();
System.IO.StringWriter oms = new System.IO.StringWriter();
oLF.Serialize(oms,oArr);
Response.Redirect(“page1.aspx?val=” & oms.ToString());
//called Page
System.Collections.ArrayList oArr = new System.Collections.ArrayList();
System.Web.UI.LosFormatter oLF = new System.Web.UI.LosFormatter ();
oArr = oLF.Deserialize(Request.QueryString[“val”]) as System.Collections.ArrayList;