Tuesday, November 8, 2011

ASP.NET server control properties behavior...

Hi all this is my first blog in the web. So please excuse me for any drawbacks.

I recently requested to do some server controls. So I read MSDN and go head with coding. Everything was working fine as described in MSDN but I encountered a problem when I deal with properties of the control. Here what I initially did..

I created some public properties and I tried to use the values of them in the




[CreateChildControls] method.


Property localisation
Then only I realized that Public properties are not assigned in the [CreateChildControls] method. So I shifted the code to [OnLoad] method and then the control is working fine. Following is the code I implemented. Hope it will helpfull.
















[OnLoad] method








Hope this is useful....

No comments:

Post a Comment