Usercontrols not being VISUALLY updated

  • Thread starter Thread starter Cirene
  • Start date Start date
C

Cirene

I have some user controls that are inside a formview control. I use the
usercontrols in the EditItemTemplate, ItemTemplate and the
InsertItemTemplate of the formview. In a 3 templates the user controls have
the exact same name (uc1, uc2, uc3).

In my formview_modechanging even I am trying to autopopulate the user
controls, if data exists. I debug the code and I can see the before and
after results of the text fields changing etc... in each user control. It
seems to work fine.

But, when the code finishes and the form is shown they are still
untouched/empty.

Any ideas what could be wrong?

Thanks.
 
What happens if you manually set a text field on one of the controls in the
page's pre-render event. Does the change get reflected ?

If not, does it get reflected if you do the same for the user control ?

Take some basic steps to see where this is falling down.
 
In the Page_Prerender I cannot yet refer to the user control, which is
located within the formview.

Maybe because the formview is based on the gridview's selected data????
 
If I do this...

CType(FormView1.FindControl("ucToMon"), common_ucTimeSelect).GetWholeTime

I DO see that the control should have a time of "2:02 PM". But visually it
does not.

Is this because the usercontrols have the same name in the various
templates?
 
Back
Top