set public property in another web user control

D

DC Gringo

I have two user controls in a web form...user control 1 contains just a
label, but I want to set its value from another web user control (2) in the
same web form. I am able to set the value from the web form, but not from
the user control 2...what am I doing wrong?

This is in the web form:

<uc1:statusMessage id="StatusMessage1" runat="server"></uc1:statusMessage>



This is in the first user control 1:

Public theMessage As String
Public Property statusMessage() As String
Get
lblStatusMessage.Text = theMessage
End Get
Set(ByVal Value As String)
theMessage = Value
End Set
End Property




This is in the user control 2:

Public WithEvents statusMessage1 As statusMessage
statusMessage1.theMessage = "No communities selected"

_____
DC G
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top