0

Kind of a complicated question, but I have a custom user control ("roster list") which contains an ASP Repeater. This control has a method called RefreshRosterList that gets called on Page_Load of the control. This control gets dynamically inserted into an UpdatePanel.

The master page contains two update panels - one for my roster list, one for other controls.

I have a separate control that causes a postback. This control ("merge courses") inserts a new record into a database and calls my RefreshRosterList method.

At the end of my RefreshRosterList method is a call to databind my Repeater with new data. I know the data is correct when it binds to the Repeater.

I say it's not updating, but I've figured out the Repeater will show the new item if I commit a second post back. What I mean by that is if I create a merge of CIS161-01 and CIS161-02 called CIS161, it won't show. After that's merged, if I create a second merge of CIS171-01 and CIS171-02 called CIS171, that's when the CIS161 merge will show but the CIS171 merge will not.

How can I get my first merge to show on databind?

I hope this makes sense. I can try to provide whatever code necessary, but it's spread out over many different files.

1 Answer 1

0

You need to set the control as a trigger of the update panel the roster list is in or trigger the update yourself.

3
  • Can I set the control as a trigger for an UpdatePanel it's not in? If so, how would I go about doing that? Edit: I've also tried finding the UpdatePanel using FindControl() and calling it's Update() method, but that doesn't work. May 31, 2012 at 19:42
  • Have you tried this? msdn.microsoft.com/en-us/library/… May 31, 2012 at 20:07
  • Yes, I have the following in my the page load event on my merge control. ScriptManager sm = (ScriptManager)Page.Master.FindControl("ScriptManager1"); sm.RegisterAsyncPostBackControl(btnMerge); May 31, 2012 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.