I ran into a problem with the CheckBoxList losing its attributes on postback, as described here: ListItems attributes in a DropDownList are lost on postback?
I created the NewCheckBoxList control, inheriting from the built-in CheckBoxList control, but can't seem to figure out where to put the class or how to get the aspx page to recognize it.
I've put the class in my web project and I have also tried putting it in a class library that we use...neither seem to work.
I added the <%@ Register tag on the page, but I keep getting this compiler error:
"Namespace or type specified in the Imports 'NewControls' doesn't contain any public member or cannot be found. Make sure the Namespace or type is defined and contains at least one public member. Make sure the imported element doesn't use any aliases."
I'm only overriding LoadViewState and SaveViewState...so I'm not sure what it wants with the public member. I'm assuming I have the class in the wrong place or haven't registered it somehow.
The referenced post says to put the class in the App_Code folder but my web project doesn't have an App_Code folder. I'm using VS2008.
So my question is...how do you actually implement a derived class from a WebControl?
Thanks in advance. George