C
Charles A. Lackman
Hello,
I have created a User Control within Visual Studio and it contains a
button that allows the user to querry a database. I dynamically add
additional controls to the page based on the number of rows retured inside a
dataset. All works well, but I have noticed that the control is rendered
after the WebForm's load event is fired. This creates duplicate controls in
certain situations. I have been able to prevent this from happening by
placing the code to dynamically render the controls in the "Pre Render"
event. But unfortunately I loose the Control's events.
Is there a way to render the controls in the "Pre Render" event and still
maintain the controls Events?
Or is there a way for the control to load prior to the Load Event of the
WebForm?
(Currently when the Controls (button click event) event is fired, the
WebForm Load Event Fires, then the Controls event - augh) What is wanted is
the Controls Event to Fire, then the WebForm Load Event. Based on the
user's interaction with the control, determines what actions the WebForm
will perform in the Load Event.
Any Suggestions would be greatly appreciated,
Thanks,
Chuck
I have created a User Control within Visual Studio and it contains a
button that allows the user to querry a database. I dynamically add
additional controls to the page based on the number of rows retured inside a
dataset. All works well, but I have noticed that the control is rendered
after the WebForm's load event is fired. This creates duplicate controls in
certain situations. I have been able to prevent this from happening by
placing the code to dynamically render the controls in the "Pre Render"
event. But unfortunately I loose the Control's events.
Is there a way to render the controls in the "Pre Render" event and still
maintain the controls Events?
Or is there a way for the control to load prior to the Load Event of the
WebForm?
(Currently when the Controls (button click event) event is fired, the
WebForm Load Event Fires, then the Controls event - augh) What is wanted is
the Controls Event to Fire, then the WebForm Load Event. Based on the
user's interaction with the control, determines what actions the WebForm
will perform in the Load Event.
Any Suggestions would be greatly appreciated,
Thanks,
Chuck