F
frankswildyearstom
hello
Q1:
"ASP.NET also allows you to write a callback method that will be
triggered when an item is removed from the cache. You can place the
method that handles the callback in your web-page class, or you can
use a static method in another accessible class. However, you should
keep in mind that this code
won’t be executed as part of a web request. That means you can’t
interact with web-page objects or notify the user."
A) I don’t understand why, assuming callback method is declared in web-
page class, won’t this callback method be executed as part of a web
request. After all, if method is in same class, then it has access to
all the web-objects and thus should also be able to interact with
them?
B) Also, if item is removed in, say, Page_Load() then that method
will be called from Page_Load(), so how is it not executed as part of
a web request?
Q2:
A) If parent control has its view state disabled, then all of its
child controls automatically have their view states also disabled. Why
is that?
As far as I know, each control has its own Viewstate object - thus
it's not like child controls use the same Viewtate object as their
parent!
B) What is the reasoning (from design’s point of view) behind this?
much appreciated
Q1:
"ASP.NET also allows you to write a callback method that will be
triggered when an item is removed from the cache. You can place the
method that handles the callback in your web-page class, or you can
use a static method in another accessible class. However, you should
keep in mind that this code
won’t be executed as part of a web request. That means you can’t
interact with web-page objects or notify the user."
A) I don’t understand why, assuming callback method is declared in web-
page class, won’t this callback method be executed as part of a web
request. After all, if method is in same class, then it has access to
all the web-objects and thus should also be able to interact with
them?
B) Also, if item is removed in, say, Page_Load() then that method
will be called from Page_Load(), so how is it not executed as part of
a web request?
Q2:
A) If parent control has its view state disabled, then all of its
child controls automatically have their view states also disabled. Why
is that?
As far as I know, each control has its own Viewstate object - thus
it's not like child controls use the same Viewtate object as their
parent!
B) What is the reasoning (from design’s point of view) behind this?
much appreciated