Bug 536546

Summary: UserControls not referencing correctly
Product: [Mono] MonoDevelop Reporter: PJ Cook <joncook6>
Component: generalAssignee: MD Bugs <monodevelop-bugs>
Status: RESOLVED DUPLICATE QA Contact: MD Bugs <monodevelop-bugs>
Severity: Normal    
Priority: P5 - None    
Version: 2.1   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X 10.6   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screenshot of errors generated

Description PJ Cook 2009-09-03 12:41:06 UTC
Created attachment 316627 [details]
screenshot of errors generated

If you try to use usercontrols in your page then you can't just reference the control using the ID in the code behind, you need to add a using statement to where the user control is located, and then distinctly type reference it.

i.e. if the control was of type CustomerAddressControl and you had called it custAddress

then instead of calling "custAddress.Address1" you would need to use "((CustomerAddressControl)custAddress).Address1"
Comment 1 Michael Hutchinson 2009-09-03 19:23:01 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 492429 ***