Why do we need methods to be static for Post Cache substitution

Q

Why do we need methods to be static for Post Cache substitution?

✍: Guest

A

ASP.NET should be able to call this method even when there isn't an instance of your page class available. When your page is served from the cache, the page object isn't created. So ASP.NET skips the page life cycle when the page is coming from cache, which means it won't create any control objects or raise any control events. If your dynamic content depends on the values of other controls, you'll need to use a different technique, because these control objects won't be available to your callback

2007-10-23, 4751👍, 0💬