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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scope in C#

Status
Not open for further replies.

zzfive03

Programmer
Jun 11, 2001
267
I have a form on which I am dynamicly placing controls. I have a "hard coded" control that is loaded when the form loads, with an on click event.

I want the event to cause some data in one of my dynamicly created controls to change, but in code, i get a complie error saying "The namespace "myTextField" cound not be found".

I am assuming that there is a scope issue as to why my onclick event can not "see" this control?? Can anyone help me.

Thank you in advance
Mark
 
Sounds like you've got too many dots in your name. eg., you're using "myTextField.myTextField.Text" and the runtime is thinking the first bit is a namespace instead of a class instance.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top