Help PLs with converting controls

Discussion in 'ASP .Net Web Controls' started by Michael Persaud, Jun 8, 2004.

  1. Im trying to have an image presented from a sql db and im trying to bring it to my web page into a panel


    Private Sub AddImage(ByVal id As Integer, ByVal name As String, ByVal image As System.Drawing.Image)

    'create a new, blank ImageListItem
    Dim item As New ImageListItem

    'use the ImageListItem's properties to store name, id, and image
    item.Tag = id
    item.Text = name
    item.Thumbnail = image

    'place the ImageListItem within the panel
    item.Location = New Point(0, nextImageY)

    'push our "next one goes here" integer down by the height of the item
    nextImageY += item.Height

    'size the item to the internal panel width and then anchor it
    item.Width = leftpanel.Width.Value
    item.Anchor = AnchorStyles.Left Or AnchorStyles.Top Or AnchorStyles.Right


    'make the ImageListItem appear within the left panel

    leftpanel.Controls.Add(item)

    End Sub


    I cant seem to get this to work without an error of "ImageListItem cannot be converted to system.ui.controls"


    Can some one pls tell me how to make the control work

    Thanks
    MP

    Is there any way to convert a system.windows.forms.control.controlCollection to system.ui.controls
     
    Michael Persaud, Jun 8, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Speak
    Replies:
    2
    Views:
    1,824
    Mike Speak
    Nov 22, 2003
  2. James Bond
    Replies:
    0
    Views:
    534
    James Bond
    Aug 3, 2004
  3. Rahul S.
    Replies:
    3
    Views:
    606
    Flash Gordon
    Nov 1, 2004
  4. Replies:
    1
    Views:
    285
    RedGrittyBrick
    Jan 2, 2008
  5. Emiliano
    Replies:
    2
    Views:
    324
    Rajesh.V
    Oct 16, 2003
Loading...

Share This Page