protected override object LoadPageStateFromPersistenceMedium() { _formatter = new LosFormatter(); object o; string vsString = Request.Form["__COMPRESSEDVIEWSTATE"]; string outStr = new ComDePress().DeCompress(vsString); o = _formatter.Deserialize(outStr); return o; }
private LosFormatter _formatter;// = new LosFormatter(); protected override void SavePageStateToPersistenceMedium(object viewState) { _formatter = new LosFormatter(); StringWriter sw = new StringWriter(); _formatter.Serialize(sw, viewState); ComDePress cmp = new ComDePress(); string outStr = cmp.Compress(sw.ToString()); Page.RegisterHiddenField("__COMPRESSEDVIEWSTATE",outStr); }