J
John Jackson
Hello all,
I have written a user control for the purpose of displaying certain
data from a data source. Instead of having the control to have access
to the data source directly, the control will raise an event to the
hosting page whenever it needs to refresh the data (e.g. user choose a
different set of rows) and the hosting page will fetch the appropriate
data from the data source. The data will then be pass back to the
control (in the form of an array of structs) for display.
However, instead of having a function in the user control for the
hosting page to call to load data, I have an "out" parameter as one of
the event parameters. The host page will assign the newly fetched data
to this parameter.
Is that a bad design? If so, why?
Thanks for all your input in advance.
-jj
I have written a user control for the purpose of displaying certain
data from a data source. Instead of having the control to have access
to the data source directly, the control will raise an event to the
hosting page whenever it needs to refresh the data (e.g. user choose a
different set of rows) and the hosting page will fetch the appropriate
data from the data source. The data will then be pass back to the
control (in the form of an array of structs) for display.
However, instead of having a function in the user control for the
hosting page to call to load data, I have an "out" parameter as one of
the event parameters. The host page will assign the newly fetched data
to this parameter.
Is that a bad design? If so, why?
Thanks for all your input in advance.
-jj