I'm using the method described in that blog to force the IDs to be what I want, but I've encountered another problem that I think might a be a result of using this method.
I've created a class that inherits from HtmlGenericControl. It overrides UniqueID and ClientID so that they both return this.ID. It also has contructors in the class that call the base class' constructors... and that's all that I have in the class.
Can someone confirm (or refute) this for me? I'm thinking there's something else I have to have in my class, but I'm not sure what that is. Any help is appreciated!
Whoops, sorry, part of the text I supplied didn't show up in my post. Here's what I meant to say:
I'm using the method from the blog to force the IDs to be what I want, but I've encountered another problem that I think might a be a result of using this method.
I've created a class that inherits from HtmlGenericControl. It overrides UniqueID and ClientID so that they both return this.ID. It also has contructors in the class that call the base class' constructors... and that's all that I have in the class.
But now I'm getting an error when I try to view the Trace page of a page that uses objects of this type. The error is a Null Reference Exception that occurs in System.Web.Handlers.TraceHandler.CreateControlTable(DataTable datatable) +2442. I'm not 100% sure
that using my custom class is causing the problem, but that's my suspicion.
Can someone confirm (or refute) this for me? I'm thinking there's something else I have to have in my class, but I'm not sure what that is. Any help is appreciated!
monolithx
Member
495 Points
108 Posts
Re: How to force...
May 06, 2006 08:00 AM|LINK
Moskie
Member
30 Points
9 Posts
Re: How to force...
Oct 29, 2006 10:53 PM|LINK
I've created a class that inherits from HtmlGenericControl. It overrides UniqueID and ClientID so that they both return this.ID. It also has contructors in the class that call the base class' constructors... and that's all that I have in the class.
Can someone confirm (or refute) this for me? I'm thinking there's something else I have to have in my class, but I'm not sure what that is. Any help is appreciated!
This is with .Net 2.0.
Moskie
Member
30 Points
9 Posts
Re: How to force...
Oct 29, 2006 11:53 PM|LINK
Whoops, sorry, part of the text I supplied didn't show up in my post. Here's what I meant to say:
I'm using the method from the blog to force the IDs to be what I want, but I've encountered another problem that I think might a be a result of using this method.
I've created a class that inherits from HtmlGenericControl. It overrides UniqueID and ClientID so that they both return this.ID. It also has contructors in the class that call the base class' constructors... and that's all that I have in the class.
But now I'm getting an error when I try to view the Trace page of a page that uses objects of this type. The error is a Null Reference Exception that occurs in System.Web.Handlers.TraceHandler.CreateControlTable(DataTable datatable) +2442. I'm not 100% sure that using my custom class is causing the problem, but that's my suspicion.
Can someone confirm (or refute) this for me? I'm thinking there's something else I have to have in my class, but I'm not sure what that is. Any help is appreciated!