SQL Viewstate in Delphi ASP.Net - How to override PageStatePersister

172 views Asked by At

I am following this example of storing the view state in the database. However, I have come to the end of the page and its asking me to override a property .. I have no idea how to achieve this in delphi. Can someone point me in the right direction?

I am using a Masterpage setup and .NET 2.0

View State in DB

EDIT: For more information, this is what I have tried:

TDefault = class(System.Web.UI.Page)
   //Code excluded
public
   function GetPageStatePersister: PageStatePersister; 
   property PageStatePersister: PageStatePersister read GetPageStatePersister;
end;

But the code inside GetPageStatePersister isn't called.

Thanks.

1

There are 1 answers

0
webnoob On

Ok, managed to sort this out. Using .NET Reflecter I dug through the System.Web.UI.Page assembly and found that the function is called get_PageStatePersiter so I have just done:

function get_PageStatePersister: PageStatePersister; override;