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

Reading a UserControl's DropDownList value from the parent page

pod
298 100+
Hello all
Thank you for reading this question, I hope that at least one of you can help me.

Here is my setup:
I have an asp.net page called personinfo.aspx
On that page I have a UserControl called UC_Code.ascx
On that UserControl I have a DropDownList called DDLcode.

Now from the code-behind of personinfo.aspx, I want to capture the DropDownList' selected value [DDLcode.SelectedValue].

If anyone one can show me how to address this, in VB or C#, it would be greatly appreciated.


Thanks a mega

P:oD

p.s.
my code is in VB, but I can convert C# code online
http://www.developerfusion.com/tools.../csharp-to-vb/
Nov 27 '13 #1

✓ answered by Frinavale

Implement a public property in your UC_Code user control that exposes the drop down list's selected value so that the personinfo page can access it. This property can be read only if your personinfo page doesn't need to set the selected value.

-Frinny

1 2993
Frinavale
9,735 Expert Mod 8TB
Implement a public property in your UC_Code user control that exposes the drop down list's selected value so that the personinfo page can access it. This property can be read only if your personinfo page doesn't need to set the selected value.

-Frinny
Dec 2 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Darrel | last post by:
I have a usercontrol that sets some public variables. I can grab this variable from another usercontrol like this: ctype(Page, templatePage).UC_getVariables.globalMenuCategory This works...
2
by: muthu | last post by:
Hi guys, Iam using vb.net as the code behind for my web application.In one of the page iam opening a popupwindow from the parent page.In that popup iam entering some value and submitting.After...
5
by: knowdotnet | last post by:
Hi all, Which is the best way to return a value back to the web page from a pop up page? I have a asp.net web application which opens a popup page on a link button click. The Link button is...
5
by: Josh Nikle | last post by:
I have a webform containing a GridView control "GridView1" and usercontrol which is also a GridView "GridView2." I have a button column in the usercontrol. The code behind that button adds an...
3
by: HP | last post by:
hi there Is it possible to bind a datasource to a dropdownlist contained in a user control if datasource is positioned on the parent page of user control? I guess not, since user control...
0
by: dit | last post by:
Hello, I found this piece of code for selecting a dropDownlist value in a repeater: <aspropDownList id=ddl DataSource="<%# SourceTable %>" runat="server" DataTextField="Name"...
1
by: cheergurl | last post by:
i have two text box inside parent page (one for user name, another one for department name) and one button that will open child page. i will choose department name at child page.The value will pass...
1
by: sdshah5 | last post by:
hi, i want to know how to pass selected value from dropdownlist of child page to a multiline textbox on the parent page. in my code it is giving me the "id" of the selected dropdown value in the...
4
by: Buddha | last post by:
Hello, I posted this on two forums, without too much help .. and I am kinda stuck in this. I need to refresh the parent page from the second child window which is opened by the first child and...
1
by: azie | last post by:
hi.. Can someone help me, how to populate textbox value from popup window into gridview at parent page. I use modal popup window (window.showModalDialog). At parent page have button add where will...
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?
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
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
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
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
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.