Ejemplo n.º 1
0
		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;
		}
Ejemplo n.º 2
0
		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);
		}