473,602 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populate data in one user control based on selection in another user control

Hi,

I have two user controls in an asp.net webpage each contains a
DropDownList. Depending on the selection of the drop down in one user
control i need to populate data in the other drop down which is in
another usercontrol in the same page. Autopostback property for the
first dropsown is set to true.

please anybody can help me in this regard .

Thanking you,
Raja Ramesh Varma

Aug 28 '06 #1
1 2589
Hi

Kindly post this asp.net question in the relevant DG.

However, the solution for your question would be,

1. Create one property in the other usercontrol, which needs to be
populated. This property should accept a datatable. In the property get, try
to assign this as the datasource and do a data bind to the drop down.

2. Since you have the autopostback to true, once you come to the server,
pull the data you need to bind in a data table. Assign it to the property,
you created in the user control.

Hope this helps. Let me know, if you want more info.

Prem

"ra************ *@gmail.com" wrote:
Hi,

I have two user controls in an asp.net webpage each contains a
DropDownList. Depending on the selection of the drop down in one user
control i need to populate data in the other drop down which is in
another usercontrol in the same page. Autopostback property for the
first dropsown is set to true.

please anybody can help me in this regard .

Thanking you,
Raja Ramesh Varma

Aug 28 '06 #2

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

Similar topics

4
12833
by: godber | last post by:
I need to populate text boxes for instance with employee information using their unique employee works number selected from a combo box. Can anyone help, I am told thru visual basic this can be achieved.
3
2417
by: Chris Kettenbach | last post by:
Hello all, Quick question. I have a listbox that is populated by items from a database. When the user select something from the list, I want to populate another listbox based on the selection in the first. Example lstCompany contains a list of company names with the primary key field hidden. After user selects a company, I want to pass that primary key back to a stored procedure and the 2nd listbox lstEmployees then be populated with...
14
3649
by: Barney | last post by:
How can I populate a textbox from a dataview? I have a dataset i'm filtering on and i want to populate several textboxes based on that filter. How can i get that to work? I've tried: dsDetails = GetCars() dvDetails = New DataView With dvDetails
0
2129
by: ROO | last post by:
Hi Everyone, I have a database table that have 4 field( C1, C2, M1, M2) on my form i have two combo box ComboC and ComboM C1 C2 M1 M2 1 Sales 1 Monthly Terms 1 Sales 2 Annual Terms
0
1265
by: xpnet | last post by:
Hi, I am using Mutliview control, and want to move a user control from one view to another view based on user selection. I can do this by placing a "Placeholder" control in each views. Based on the user selection, remove the control from the placeholder and add to annother placeholder as: Me.divViewHome.Controls.Remove(Me.DiySearchSide1) Me.divViewResults.Controls.Add(Me.DiySearchSide1) For the first time when moving the usercontrol to...
4
13949
by: whamo | last post by:
I have the need to populate a field based on the selection in a combo box. Starting out simple. (2) tables tbl_OSE_Info and tbl_Input; tbl_OSE_Info has three fields: Key, OSE_Name and OSE_Wt tbl_Input has three fields: OSE_Job, OSE_Name, OSE_Wt I have populated tbl_OSE_Info table. I need to create a form that will store the data in tbl_Input I have racked my brain so much trying to figure out how to auto populate a field based on a...
2
3319
by: Ronald | last post by:
I hope somebody can help. I can't get into the specifics of my project, but I'll try to create a simple example: tblVehicle * VIN (text box) * Make (text box) * Model (text box) frmRepair
1
1692
by: KMEscherich | last post by:
Platform = Windows Program = Access 2003 Hi there, I am stumpped!! I am attempting to populate a form control as follows: I have a form that has 2 drop-down boxes. One retrieves the EMP_ID and the 2nd one retrieves the EMP_NAME and EMP_ID.
9
3389
by: clloyd | last post by:
I thought I posted this earlier but must have not completed it. I have a field Status that I have a default value on of Open when a user adds a new record. This is an older form and I just added the default to avoid people leaving it blank. This same field also populates another field based on the selection they make in the field Status. My problem now is if the user keeps the default (does not change it to another selection or does not...
0
7993
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7920
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6730
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5440
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.