Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Huh?
Message
From
13/05/2004 13:12:05
 
 
To
12/05/2004 10:08:41
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Other
Title:
Re: Huh?
Miscellaneous
Thread ID:
00903158
Message ID:
00903701
Views:
26
Jim,

I am not sure what the exact problem is, but I know that the webserver assigns an ID attribute to all server controls on your page if you don't, and their name is usually a string that contains a "__ctrl" substring.

I made a custom control that dynamically instantiated and loaded subcontrols and got an error message that I fixed by creating a static integer ID field in my class, that I incremented in my class constructors,

public class CustomControl
{
static int ccCount;
...

public CustomControl ()
{
ccCount++;
...

and manually assigning an ID to every control that I added dynamically in my method, i.e.,

CustomControl aControl = new CustomControl();
aControl.ID = "control" + CustomControl.ccCount;

to circumvent the webservers automatic assignment.

Microsoft has a hotfix that we had to contact them to download, and it didn't fix the problem, but we had two levels of dynamic creation, i.e., we loaded a control that dynamically created controls that dynamically created controls. Even if you aren't dynamically creating controls, you might try assigning ID attributes to all the server controls that you have. I think Microsoft automatic ID assignment is wonky.
David S. Alexander
Kettley Publishing
20271 SW Birch Street, 2nd Floor
Newport Beach, CA 92660-1752
Previous
Reply
Map
View

Click here to load this message in the networking platform