473,495 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Something about User Control,... wait online... thank you

hi,

I've one page , which contains two user controls' instance,

A is a dropdownlistbox ( because it has some complex load code, I sealed it
into an ascx),
B is information of one db record.

how can I make B retrives data from DB according to A's dropdownlistbox
SelectionChanged Event ?

thanks a lot !
Nov 18 '05 #1
3 873
Communicate between user controls
http://www.fawcette.com/vsm/2002_07/...year_07_22_02/

Hope this helps,
--Michael

"Edward" <zi***@citiz.net> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl...
hi,

I've one page , which contains two user controls' instance,

A is a dropdownlistbox ( because it has some complex load code, I sealed it
into an ascx),
B is information of one db record.

how can I make B retrives data from DB according to A's dropdownlistbox
SelectionChanged Event ?

thanks a lot !

Nov 18 '05 #2
"Edward" <zi***@citiz.net> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl...
hi,

I've one page , which contains two user controls' instance,

A is a dropdownlistbox ( because it has some complex load code, I sealed it into an ascx),
B is information of one db record.

how can I make B retrives data from DB according to A's dropdownlistbox
SelectionChanged Event ?


You could declare a public event in A and raise it within the
SelectionChanged handler in A. You would also want to declare a property in
A which returns the value of the selection from the dropdownlist.

You could declare a property in B which can be set with the key of the data
to retrieve.

The page would then handle the event from A and set the property in B with
the value of the property in A.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #3
Thanks, Raterus and John.
Nov 18 '05 #4

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

Similar topics

13
1563
by: Lloyd Sheen | last post by:
I have now spent 5 hours on google/msdn looking for something useful in the creation of user controls for asp.net. The VS 2003 has very limited support for things such as absolute positioning of...
5
1614
by: Drew | last post by:
I have a user control written in C#. This user control uses some of my mixed mode C++ libraries. My user control is currently residing on a .NET Windows Form. Everything works nicely. Now I am...
7
7712
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
3
2255
by: Eric | last post by:
I have built a composite user web control that I want to create dynamically. The form will contain a variable number of these controls and as well some of the contents of the user web control...
7
2971
by: Shimon Sim | last post by:
I have a custom composite control I have following property
7
1277
by: Mr Newbie | last post by:
Hi There, Here I am messing about with User Controls and I seem to have a conundrum on my hands which I'm sure you chaps will unravel for me in the blink of an eye.
3
7775
by: George Jordanov Ivanov | last post by:
Folks, I am implementing a WebUserControl, which will have its own custom event StateChanged. Now, I want to add this event to the Events tab in the control properties, so that the users of my...
15
1851
by: Ofer Zelig | last post by:
I'll describe the simplest situation of the problem. I have a simple Web User Control which only contains a: <div id="bla" runat="server" /. I dynamically add it to a page, by performing: ...
2
5044
by: Max2006 | last post by:
Hi, I have a user control with a public property like this: public string Text { get { return cboCountry.Text; } set { cboCountry.Text = value; } }
0
6991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7160
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,...
1
6878
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
7373
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
5456
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,...
1
4897
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...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.