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

Show aspx page

6 Answers 125 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 17 Jan 2008, 03:17 PM
I have a combobox on my page. In dependets of selected item I want to show a aspx page as tooltip when I move over a image on the page. I check the documention and demos but I could not find any helpful information. Can I do this and if so how?

6 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 17 Jan 2008, 04:14 PM
Hello Markus,
Yes, you can do this. You can use the RadToolTipManager - just add the ID of your image to its TargetControls collection and in the AjaxUpdate handler of the manager, check the selected value of the combobox and add an IFRAME with the appropriate SRC to the UpdatePanel of the tooltip that is about to show. 

You can have a look at our online examples that demonstrate how you can use the AjaxUpdate event of the RadToolTipManager.

Greetings,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 18 Jan 2008, 01:55 PM
Thanks for help, but your description overcharges me a little bit. I don't know what you mean with "IFRAME", UpdatePanel (AjaxUpdatePanel?) and how to comine al those things. Do you have a code snippet available for me?
0
Tsvetie
Telerik team
answered on 18 Jan 2008, 03:03 PM
Hi Markus,
As you mention you want to open an ASPX page in the tooltip, I mentioned you will need to use an IFRAME - please refer to the MSDN for information on this HTML element.

As for the UpdatePanel control - for information, please click this link.

However, you need not know much about the UpdatePanel - I only mentioned it as you will need to add the IFRAME to the UpdatePanel in the RadToolTip:
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)  
{   
    HtmlGenericControl iframe = new HtmlGenericControl("IFRAME");  
    iframe.Attributes["src"] = "Test.aspx";   
    args.UpdatePanel.ContentTemplateContainer.Controls.Add(iframe);  

In this code fragment, I use the AjaxUpdate handler of the RadToolTipManager to create an IFRAME, set its SRC attribute to the desired ASPX and add it to the RadToolTip that is about to show.

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 23 Jan 2008, 12:02 PM

Thanks for help, now I am a step further, but the goal is not yet made.

I see now the tooltip with the page I need. The problem is now I see the tooltip at a lot of images, but non of the images is the image I add with "TargetControls.Add". What could be the problem?

I want to show the same page for all tooltips, but with different informations on it, so I need a way to find out on the page to show as tooltip for which image the tooltip has to be shown.

Here is my code:

    Private Sub rttMain_AjaxUpdate(ByVal sender As ObjectByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles rttMain.AjaxUpdate  
 
        Dim iframe As HtmlGenericControl = New HtmlGenericControl("IFRAME")  
        iframe.Attributes("src") = "error.aspx" 
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(iframe)  
        rttMain.TargetControls.Add(imgInfoBookingPersno.ClientID, False)  
 
    End Sub 
 
0
Tsvetie
Telerik team
answered on 25 Jan 2008, 08:53 AM
Hi Markus,
From the code fragment you have provided, I can see that you add an ID to the TargetControls collection of the RadToolTipManager, once a RadToolTip opens (the AjaxUpdate event fires just before a RadToolTip opens). In case you want the manager to set the tooltips for some images, you have to add their IDs to the TargetControls collection, once you add the images to the page. 

Regarding your question about passing arguments from the parent page to the page you open in the tooltip - you can use the query string for example. Please refer to MSDN for information.

Sincerely yours,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 25 Jan 2008, 11:29 AM
Thnaks for great support! I put it now to "Page_Load" and everything works fine.
Tags
ToolTip
Asked by
Markus
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Markus
Top achievements
Rank 1
Share this question
or