开发者

Update panel controls not updating

开发者 https://www.devze.com 2022-12-25 14:26 出处:网络
I have an aspx page that contains an update panel. Within this there are several user controls, each with a label to display an error.

I have an aspx page that contains an update panel. Within this there are several user controls, each with a label to display an error. Within these controls are more child controls where exceptions are caught and an ExceptionEncountered event is raised to deal with them.

The parent control (with the err开发者_如何学Cor label) listens for the ExceptionEncountered event and sets the text of the label accordingly.

The problem is that the label text on the screen does not change.

Any idea what could be wrong?


If the label is outside your current ContentTemplate, it cannot be be updated. Move it inside the required ContentTemplate.


Look at your triggers for the update panel. Make sure you have a trigger that will fire when the exception is handled. Also, check to see as above that ContentTemplate includes the label.


Make sure that your update panel's UpdateMode is set to 'Conditional'

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号