Problem in UpdateToolTip()

2 posts, 0 answers
  1. jpchenot
    jpchenot avatar
    20 posts
    Member since:
    Jan 2008

    Posted 21 Jan 2008 Link to this post


    When I write the code to update the tooltip in my vb code I get the error:
        - Cannot convert type system.web.ui.control to content.

    Content is my web usercontrol. Here is my code


    Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)
    Dim ctrl As UserControl = Page.LoadControl("~/secured/admin/Content.ascx")   panel.ContentTemplateContainer.Controls.Add(ctrl)
    Dim content As Content = DirectCast(ctrl, Content)
    content.ContentID = elementID
    End Sub

    The error is on the ctrl element. I have copied the code from the demo, so it should work. I don't understand what's wrong.



  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 22 Jan 2008 Link to this post

    Hello Jean-Philippe,
    Please make sure that you have the following line in your aspx:
    <%@ Register Src="Content.ascx" TagName="Content" TagPrefix="uc1" %> 

    In case this does not solve the problem, please open a new support ticket and send us a simple running project, demonstrating it.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top