User-1330468790 posted
Hi CopBlaster,
Could you please confirm that what you used is the class "CompressedViewStatePage" which should be the base page to be extended to compress the view state?
You said
"I take it from the lack of responses that it is not possible to both use a compressed view state and AJAX".
However, I think it is possible to use both since Ajax does not clash with compressed view state. I think the problem is located in the below piece of codes.
protected override void SavePageStateToPersistenceMedium(object state)
{
LosFormatter lf = new LosFormatter();
StringWriter sw = new StringWriter();
lf.Serialize(sw, state);
byte[] b = Convert.FromBase64String(sw.ToString());
ClientScript.RegisterHiddenField("__VSTATE",
Convert.ToBase64String(Compress(b)));
}
If you are using Ajax, the "ScriptManager" would be the choice since it is designed to manage ASP.NET Ajax script libraries
and script files, partial-page rendering, and client proxy class generation for Web and application services.
I find another example about how to compressed view state and you could refer to how it makes the compressed view state working with ajax.
COMPRESSING VIEWSTATE IN ASP.NET USING AJAX
Hope this can help you.
Best regards,
Sean