user control needs data

G

Guest

hey all,
i have a simple web page that has one DropDownList that contains employees.
The page also has a WebUserControl that displays a GridView of records
related to the DropDownList.SelectedValue.

On the PageLoad of my web page how can i get the DropDownList.SelectedValue
(which is the EmployeeID) into the WebUserControl so i can set the SQL Select
statement to pull in the records for the correct EmployeeID?

thanks,
rodchar
 
G

Guest

Can't you just make a public method "PopulateData (int userId)" on your
UserControl?
Peter
 
C

Cowboy \(Gregory A. Beamer\)

Create a property to get the data in. You can then do whatever you want with
the value.

You may have to create a private variable for the control, as it is not
always created when you drop the control on a page (esp. in 1.x)
 
G

Guest

Does this Property go into the UserControl? My understanding is that the User
Control wants to get the Data from the page. I don't quite get how to do
this from what I see here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top