Usercontrols not being VISUALLY updated

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.
 
R

Rain

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.
 
C

Cirene

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????
 
C

Cirene

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?
 
C

Cirene

Oh by the way, all these controls are within a MASTER page. I wonder if
that matters...
 

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

Forum statistics

Threads
473,754
Messages
2,569,520
Members
44,996
Latest member
rainocode

Latest Threads

Top