N
~~~ .NET Ed ~~~
Background:
My (web) composite control has several drop down lists and buttons..
These drop downs get their data from the database (the drop downs are
DataBind'ed). And these are kind of cascaded (2nd depends on the selection
of the 1st).
Issue:
When I select an item from the dropdownlist control the
SelectedIndexChanged event gets fired, there is a PostBack then. At this
point I notice that CreateChildControls() is being called again for my
composite control. Does that mean that the control gets re-instantiated on
every postback? I was under the impression that once created the instance
"lived" on the server until the page was unloaded.
Yes, I am sure it is a pretty stupid question but I would like to know if I
misunderstood something. In particular I wanted to determine within my
composite if it was in a PostBack or not. From my previous post it is clear
that Page.IsPostBack is not available in CreateChildControls()
My (web) composite control has several drop down lists and buttons..
These drop downs get their data from the database (the drop downs are
DataBind'ed). And these are kind of cascaded (2nd depends on the selection
of the 1st).
Issue:
When I select an item from the dropdownlist control the
SelectedIndexChanged event gets fired, there is a PostBack then. At this
point I notice that CreateChildControls() is being called again for my
composite control. Does that mean that the control gets re-instantiated on
every postback? I was under the impression that once created the instance
"lived" on the server until the page was unloaded.
Yes, I am sure it is a pretty stupid question but I would like to know if I
misunderstood something. In particular I wanted to determine within my
composite if it was in a PostBack or not. From my previous post it is clear
that Page.IsPostBack is not available in CreateChildControls()