>>Hi everybody,
>>
>>I'm adding an attribute to a control in a UserControl. I suspect I don't have to do this every time. But how can I find out if my UserControl loads the first time or not?
>>
>>Thanks in advance.
>
>Check Page.IsPostBack, if it's true, you may not need to reload it. Controls do load everytime, but there is a lot of code in the background which makes it appear as though they are maintaining state.
Page IsPostBack would not help me, because in my case the FormViews are invisible on initial load. I guess I would not worry about possible overhead.
If it's not broken, fix it until it is.
My Blog