R
Robert Koritnik
I ran into a strange problem. I created my own server control that inherits
Control and INamingContainer. I override CreateChildControls() method.
Within this method i try to register some client script block with methods,
that the control container (the Page) provides (RegisterClientScriptBlock
etc.) When I try to check for slient script registration on the page i get
the "Object reference not set to an instance of an object." runtime error.
Debugging the code I realised that Custom control's property Page (inherited
by Control class) is null. Anybody knows why and when does that happen?
Robert
Control and INamingContainer. I override CreateChildControls() method.
Within this method i try to register some client script block with methods,
that the control container (the Page) provides (RegisterClientScriptBlock
etc.) When I try to check for slient script registration on the page i get
the "Object reference not set to an instance of an object." runtime error.
Debugging the code I realised that Custom control's property Page (inherited
by Control class) is null. Anybody knows why and when does that happen?
Robert