ToolTipManager + Anchor Tag + AjaxUpdate

2 posts, 0 answers
  1. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 01 Jun 2012 Link to this post

    Is the above possible ?

    Essentially, i've got a collection of html anchor tags. I've set them to runat server and added their i'd to the target controls of the RadToolTipManager.

    What i want to do is have each of these anchor tags cause an ajaxupdate request of the tooltipmanager and show the tooltip.
    Each of the anchor tags has an id, which relates to an id in my database. I therefore want to query the database with this ID and pull out the appropiate information associated with the anchor tag.

    The anchor tag enscapsulates an image, so if there's an easier way in which i should use a different control/element let me know.


  2. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 05 Jun 2012 Link to this post

    Hello Alan,

    This is possible, it does not matter whether the target controls are anchors, divs, images or some other HTML elements. The essence is that you need to pass the needed information about the target control, for example in the Value property each tooltip holds, so you can extract it easily in the OnAjaxUpdate event handler to perform your query. I would advise that you add the server ID to the Value property to make sure you have it, as an INaming container in the page's hierarchy can change the target control ID. In case you are using ShowEvent="OnClick" you may want to set the href attribute of the anchors to javascript:void(0); to avoid the default anchor behavior to scroll the page to the target of the href attribute.

    I believe that the following demos are very close to your scenario:
    Update TargetControls with AJAX - also uses hyperlinks as targets, passes a value.
    Load on Demand - shows how to pass values

    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top