Load and Update of data in Custom Control

J

John Bankhead

I have a customer web control that displays data in the user prescribed
format on an aspx. I create it in Page_Load and add it to the page.Controls
list in the correct place between the form tags. The data looks good. The
user changes some data and clicks the Save button. The event gets sent to
"Public Overrides Sub ProcessUserDirective(ByVal menu As String, ByVal cmd As
String)" which is a method in the code. The Update method on the web control
fires and updates the database.

This is where things go wrong. Since the web control is created in page
load it is already rendered before the update occurs which means that the
data display is one cycle behind in accuracy. I am creating the controls in
my Web Control in the CreateChildControls method.

Without completely restructuring the control, where can I place the update
so that it occurs before the reload of data?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top