Show aspx page

7 posts, 0 answers
  1. Markus
    Markus avatar
    196 posts
    Member since:
    Dec 2007

    Posted 17 Jan 2008 Link to this post

    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?
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 17 Jan 2008 Link to this post

    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
  3. Markus
    Markus avatar
    196 posts
    Member since:
    Dec 2007

    Posted 18 Jan 2008 Link to this post

    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?
  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 18 Jan 2008 Link to this post

    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
  5. Markus
    Markus avatar
    196 posts
    Member since:
    Dec 2007

    Posted 23 Jan 2008 Link to this post

    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 
     
  6. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 25 Jan 2008 Link to this post

    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
  7. Markus
    Markus avatar
    196 posts
    Member since:
    Dec 2007

    Posted 25 Jan 2008 Link to this post

    Thnaks for great support! I put it now to "Page_Load" and everything works fine.
Back to Top