473,402 Members | 2,055 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,402 software developers and data experts.

User Controls: can they communicate?

I have multiple user controls (.ascx) on a page (.aspx). How can a user
control interact with each other? Also, how can a user control interact with
the page?

TIA,
Douglas
Nov 15 '05 #1
3 2885
They cannot automatically communicate with each other. The host is their
protocol. Use the form they are on to send messagaging and trap events btw
various controls. I communicate w/ my controls by way of events. Define an
event in the control w/ the needed event arguments. On the host page
subscribe to the event after initializing the control. When the ctrl needs
to send something ("communicate") w/ the host form it sends the event
notification. Standard User32 stuff.

Hope this helps.

Nick Harris, MCSD
http://www.VizSoft.net
"Douglas Macnguyen" <do***************@msn.com> wrote in message
news:uY**************@TK2MSFTNGP10.phx.gbl...
I have multiple user controls (.ascx) on a page (.aspx). How can a user
control interact with each other? Also, how can a user control interact with the page?

TIA,
Douglas

Nov 15 '05 #2
Through the use of properties, methods, and events.

If the main page needs to respond to some action from the usercontrol, that
control should expose some events that the main page can subscribe to.

If you want usercontrols to communicate with each other, then again, setup a
series of event notifications and subscribe as needed.

"Douglas Macnguyen" <do***************@msn.com> wrote in message
news:uY**************@TK2MSFTNGP10.phx.gbl...
I have multiple user controls (.ascx) on a page (.aspx). How can a user
control interact with each other? Also, how can a user control interact with the page?

TIA,
Douglas

Nov 15 '05 #3

Hi Douglas,

Do you still have any concern?
Please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4

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

Similar topics

88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
by: Dan | last post by:
All, I have a windows form application. The form will host various user controls that will implement an interface so that was new controls can be added later without recompiling the hosting...
4
by: Josh Harris | last post by:
Here is my question: It is common to have many pieces of business logic encapsulated within asp.net user controls. This can be found in high visibility projects such as the iBuySpy portal from...
2
by: Wee Bubba | last post by:
i started by designing my web page using frames. i had my data entry form in an upper form and my data rows displaying in a lower frame. i soon discovered that ASP.NET is not really meant for...
0
by: poppy | last post by:
Is it possible to get 2 windows forms controls, embedded on a webpage with the <object> tags to communicate/raise events in eachother ? I know that on the client side you can set a property in a...
13
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas?...
0
by: jonathan.beckett | last post by:
I have been working on a client project recently that is using winforms ..NET user controls within web pages in Internet Explorer, and need to find out how to make the user control communicate back...
1
by: zb | last post by:
Here is the page architecture: Page loads multiple user controls (including nested user controls) dynamically based on parameters provided into place holders. Note: The page only has the logic to...
1
by: zeya_bakhtyar | last post by:
Here is the page architecture: Page loads multiple user controls (including nested user controls) dynamically based on parameters provided into place holders. Note: The page only has the logic to...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...

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.