473,386 Members | 1,652 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,386 software developers and data experts.

2 User Controls on a page need to talk.

UJ
I have two user controls on a page. When a user selects something from one,
the other one has to react. How do I go about this?

TIA.

Jeffrey.
Nov 19 '05 #1
2 1367

"UJ" <fr**@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I have two user controls on a page. When a user selects something from one, the other one has to react. How do I go about this?

TIA.

Jeffrey.

Here is how I would handle it. There may be other ways.
Page1 has controlA and ControlB. In Page1 declare the controls "withevents".
In ControlA you need an event which can be raised, say ControlA_Click. In
ControlB you need a property which can be set. In Page1 you need a process
to handle the ControlA_Click event. In that process you set the property of
controlB. If you need to pass a value then you can pass it in an event
argument.

Mike

Nov 19 '05 #2
Jeffrey:
Take a look at:
http://www.openmymind.net/index.aspx?documentId=9

You'll find that there are a couple method, either accessing the data
directly or using custom events. But in either case, the user controls need
to go through the page in order to access each other.

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!)
"UJ" <fr**@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I have two user controls on a page. When a user selects something from one,
the other one has to react. How do I go about this?

TIA.

Jeffrey.

Nov 19 '05 #3

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

Similar topics

2
by: Bennett Haselton | last post by:
I'm looking for a PHP tutorial that specializes in how to build sites that are based around user logins. i.e. the user logs in on the front page, and are taken to a main login page where fields on...
1
by: Paul | last post by:
Hi, I was wondering if somebody could point me to a good article/tutorial that can explain how I can get one user control on a page to access variables or methods in a separate user control on...
10
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
2
by: Ric | last post by:
im new to asp.net. from what i understand, you have the aspx file (presentation), user-control(ascx file), code-behind(vb file) and components(compiled vb and dll files). the aspx file contains a...
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...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
4
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Just wondering if someone can help me out. I'm building a web app that uses UserControls for different forms etc. I have a few UserControls that are embeded and I want to be able to call/pass data...
0
by: robgallen | last post by:
I have 2 user controls within a master page, and I would like one of them to call a function in the other. All the examples I have seen involve a page communicating with the Master page, or with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.