This is a migrated thread and some comments may be shown as answers.

ToolTipManager + Anchor Tag + AjaxUpdate

1 Answer 41 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Alan T
Top achievements
Rank 1
Alan T asked on 01 Jun 2012, 05:17 PM
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.

Regards,

Alan

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 05 Jun 2012, 10:52 AM
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


Regards,
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.
Tags
ToolTip
Asked by
Alan T
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or