Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ControlID error when subclassing third-party controls
Message
From
08/03/2004 10:37:23
Filip Bruman
Kirschberg Holding
Copenhagen, Denmark
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00881974
Message ID:
00884097
Views:
92
Hello Kevin,

>Just look for code that's automatically added to the form in the "hidden" code area to see if anything looks suspicious that might be causing this error.

I am no where near to call myself an expert, but I can not identify anything suspicious in the generated code. I've included the generated code for the two controls here :
// 
// comboBoxAdv1
// 
this.comboBoxAdv1.AutoDisabledList = false;
this.comboBoxAdv1.AutoDisabledValue = false;
this.comboBoxAdv1.BindingSource = null;
this.comboBoxAdv1.BindingSourceDisplayMember = null;
this.comboBoxAdv1.BindingSourceValueMember = null;
this.comboBoxAdv1.BindingValueSource = null;
this.comboBoxAdv1.BindingValueSourceMember = null;
this.comboBoxAdv1.ControlID = new System.Guid("00000000-0000-0000-0000-000000000000");
this.comboBoxAdv1.Location = new System.Drawing.Point(832, 544);
this.comboBoxAdv1.Name = "comboBoxAdv1";
this.comboBoxAdv1.SelectedIndex = -1;
this.comboBoxAdv1.TabIndex = 4;
this.comboBoxAdv1.ValueBinding = null;
// 
// comboBoxAdv2
// 
this.comboBoxAdv2.AutoDisabledList = false;
this.comboBoxAdv2.AutoDisabledValue = false;
this.comboBoxAdv2.BindingSource = null;
this.comboBoxAdv2.BindingSourceDisplayMember = null;
this.comboBoxAdv2.BindingSourceValueMember = null;
this.comboBoxAdv2.BindingValueSource = null;
this.comboBoxAdv2.BindingValueSourceMember = null;
this.comboBoxAdv2.ControlID = new System.Guid("00000000-0000-0000-0000-000000000000");
this.comboBoxAdv2.Location = new System.Drawing.Point(832, 568);
this.comboBoxAdv2.Name = "comboBoxAdv2";
this.comboBoxAdv2.SelectedIndex = -1;
this.comboBoxAdv2.TabIndex = 5;
this.comboBoxAdv2.ValueBinding = null;
When I build and run (F5), I can see that the second combobox is hitting the upper left corner of the form, and once I've killed the application and view the code again the following line (for the second combobox) looks like this :
this.comboBoxAdv2.Location = new System.Drawing.Point(0, 0);
Now, switching from code view to UI view the Duplicate declaration of member 'ControlID' appears.

Regards

-Filip
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform