S
Selden McCabe
I have a webusercontrol with several controls on it, including an image
control.
I've coded a public sub "Display" which puts an image in the Image control.
The problem is, when I call Display, the Image control is nothing. Why?
In fact, when I get to this point, all the controls (lblPrice, etc.) are
nothing.. Why?
Here's some code:
Public Sub Display()
'refresh controls, show picture and text
Try
DisplayImageBytes(m_Image, Image1, "Package1")
lblContents.Text = m_Contents
lblPrice.Text = m_Price.ToString("{0:c}")
Catch ex As Exception
End Try
End Sub
When this executes (it gets called from the parent form which contains the
usercontrol) it gives me an error because it says Image1 is nothing.
What's going on?
Thanks!
---Selden McCabe
control.
I've coded a public sub "Display" which puts an image in the Image control.
The problem is, when I call Display, the Image control is nothing. Why?
In fact, when I get to this point, all the controls (lblPrice, etc.) are
nothing.. Why?
Here's some code:
Public Sub Display()
'refresh controls, show picture and text
Try
DisplayImageBytes(m_Image, Image1, "Package1")
lblContents.Text = m_Contents
lblPrice.Text = m_Price.ToString("{0:c}")
Catch ex As Exception
End Try
End Sub
When this executes (it gets called from the parent form which contains the
usercontrol) it gives me an error because it says Image1 is nothing.
What's going on?
Thanks!
---Selden McCabe