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

Problem in UpdateToolTip()

0 Answers 35 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
jpchenot
Top achievements
Rank 2
jpchenot asked on 21 Jan 2008, 09:31 AM
HI.

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

Private

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.

regards,

Jean-Philippe

No answers yet. Maybe you can help?

Tags
ToolTip
Asked by
jpchenot
Top achievements
Rank 2
Share this question
or