ASP.NET Master Page View State Persistance Issue

I'm trying to use PageStatePersister solution (found at http://msdn.microsoft.com/en-us/library/aa479403.aspx) in order to decrease the size of page View State. I've added the code lines attached to this question on code behind of every page but it did not decreased the size of View State on any page. Where as on one of my other similar application this worked fine.

The only issue i can clue about is that the pages are specified with a Master page file and i'm unable to override the PageStatePersister for Master Page (the error comes with description like 'no suitable method found to override').

Please let me know how can i decrease Page View State size of an .aspx page which has a Master Page specified.

Regards.
protected override PageStatePersister PageStatePersister
{
    get { return new SessionPageStatePersister(this); }
}

Open in new window

23-degreesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xav056Commented:
create a base page where all your regular pages will inherit from
and in this base page add your methos
protected override PageStatePersister PageStatePersister
{
    get { return new SessionPageStatePersister(this); }
}

just make sure to move it from the master page code behind and make every page in your application inherit from
basepage which in turn inherits from System.Web.Ui.Page
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
23-degreesAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.