Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
I have a lblErrorMessage label server control in a child masterpage. lblErrorMessage is in a panel which is inside a Callbackpanel. I have a content page which has another CallBackpanel. Both callbackpanles have the same groupname and they each fire their own test javascript function which displays a test message after the update is complete using ClientSideAfterUpdate.
lblErrorMessage is modified in the content page when its callbackpanel does a callback. Everything works fine when lblErrorMessage is set to display any text EXCEPT when it's set to a blank (lblErrorMessage.text = ""). After a callback the old error message is still showing even though it's cleared AND its parent panel is made invisible. I noticed that the ClientSideAfterUpdate's masterpage callbackpanel doesn't fire when lblErrorMessage.text = "" which means the update for this callbackpanel didn't happen. I even call Update() explicitly n my code and that didn't help.
Without any callbackpanels (full postbacks), everything works fine. When I replaced the callbackpanels with MS's UpdatePanel , everything works fine also. This tells me there's an issue with the CallbackPanel.
|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
I created a minimal project to replicate the issue but the project works fine. This issue seems to manifest by certain conditions.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You may want to check your client side event handlers and see if it has to do with them. Because the Label is inside a Panel control, so whether the Label is empty really doesn't make any difference to the CallbackPanel. Regardless the Label is empty or not, the CallbackPanel always at least have the ASP.NET Panel. So there is no difference from the CallbackPanel's point of view. Thus I would suggest you to check your event handler and see if any code fails there first. If that does not reveal anything, we will need you to duplicate the error first.
Thanks!
|