HI!
does anybody know about different between this.Page and (Page)HttpContext.Current.Handler?
i had a problem that this.page returned null, and someone wrote me that using the construct "(Page)HttpContext.Current.Handler" will be better.
thanks!!
Shani
this.Page
will find a control's Page by searching it's parent hierarchy.
HttypContext.Current.Handler
will find the page by looking at the current context (thread).
The first will be null even when the second is valid if the control hasn't been put into the page hierarchy yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With