Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Able to Pull Values from a UserControl?

Status
Not open for further replies.

nimarii

MIS
Jan 26, 2004
213
US
Hi,

I have a webform with several usercontrols and a few buttons.

The OnClick event of the button should be able to pull values from one of the usercontrols, and use those values to create a SELECT statement query that returns the results from a database and populates a dropdownlistbox.

Is this possible? I've been trying to reference the controls within the usercontrol in my aspx.cs file, but everything I try generates an error message.
 
I am not familiar with C#, but this is how I have done it using VB code:
Code:
'Use this declaration in your web page at the class level.
    Protected WithEvents ucAssessment41 As ucAssessment4

I'm sure you can convert this to C# easily

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top