473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

set public property in another web user control

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
Nov 19 '05 #1
1 1425
Dingo:
Check out:
http://openmymind.net/index.aspx?documentId=9

I'm in a rush, else I'd explain in great detail :) lemme know if that solved
it for you...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: DC Gringo | last post by:
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...
1
by: Gramps | last post by:
Hi, I have a simple ascx(Banner) that consists of an image a label and a public property, 'ThisTitle'. From a page I want to set the label via assignment to the property. The only way I can...
6
by: Paperback Writer | last post by:
I have 30 textBox in my UserControl...they are with PROTECTED modifier. But i need to access these TextBox throught my WebForm... What is the best way to access them ? leaving PROTECTED and...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
1
by: Will Gillen | last post by:
I know this has probably been asked before, but I can't seem to find a solid answer in any of the archives. First, before my question, please forgive my limited knowledge of the event lifecycle...
4
by: Jon Paal | last post by:
I have a public property in my server control and I want to populate it with values generated by the control. When I assign the value of the property to a function in the control, which creates...
9
by: J055 | last post by:
Hi I have a standard asp page which uses a MasterPage. The MasterPage contains a User control. How can I access a public method in the User control from my WebForm page? I can't move the method...
1
by: John Kotuby | last post by:
Hi all, In ASP.NET 2.0 I have some pages that are composed of a Master Page and several User controls. In one of the pages I declare a Public variable within the code-behind of a User Control on...
2
by: Web Search Store | last post by:
I am trying to make variables available in my web application by making user controls I classic asp I was able to put them all in an #include which made them available throughout the asp script...
11
by: Web Search Store | last post by:
Hello, I set up a web page with 2 user controls. In classic asp, the first one did all the declarations, and the second one used the values, and could reset it. In ASP.Net so far I can't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.