Dynamic tooltip content disappears after Ajax update

3 posts, 0 answers
  1. Larkin Young
    Larkin Young avatar
    141 posts
    Member since:
    Feb 2005

    Posted 09 Sep 2007 Link to this post

    Hopefully you can repro this without me having to put together a sample project, but the basic scenario is that I have tooltip objects that are creating in the ItemDataBound event handler or a Repeater. In this ItemDataBound event handler I am creating some content within a Panel that I then add to the ToolTip's controls collection. Works fine on page load, but after an Ajax update the tooltip pops up, but without any content. After reviewing the HTML source it appears that the Panel that is added to the ToolTip's controls collection is not rendered to the client.

    Any initial ideas as to the cause?

    Thanks,
    Larkin
  2. Peter
    Peter avatar
    4 posts
    Member since:
    Jul 2007

    Posted 09 Sep 2007 Link to this post

    I'm encountering a very similar situation - I don't have time at the moment to put together a sample scenario. 

    I'm using the tooltipmanager, with one linkbutton assigned as a target control  In the repeater's itemdatabound I'm adding other targets, which work exactly once.  After that the linkbutton that was assigned initially in the .aspx still works, but none of the dynamically added targets work.  If it matters, I'm using the on click event.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Larkin Young
    Larkin Young avatar
    141 posts
    Member since:
    Feb 2005

    Posted 10 Sep 2007 Link to this post

    Actually, I resolved my problem..and I feel foolish for not seeing this. I had the Repeater control being bound on every page load, or so I thought until another developer changed this to only happen on initial load. Since the Panel I added to the ToolTip's controls collection wasn't being tracked by viewstate it wasn't being reloaded on postback, hence the disappearance of the content. I modified the page slightly and declared the content panel in the ItemTemplate of the Repeater, within the ToolTip element and simply bound the necessary dynamic properties in the ItemDataBound event. Worked fine after that..my guess is that this is your problem as well.

    - Larkin
Back to Top