asp.net - Register custom class in assembly with web project -


i'm using web project , web forms.

i create custom class

 namespace customwebcontrols   public class novalidationddl     inherits dropdownlist     end class end namespace 

and try register class in assembly web.config page section

<controls>         <add tagprefix="customddl" namespace="customwebcontrols" assembly="ae" /> </controls> 

and try use in ascx

<customddl:novalidationddl id ="id" runat="server"></customddl:novalidationddl> 

how can in web project?

this should work (assuming assembly name project ae) - make sure build project after creating/modifying custom control. unless updated 'ae.dll' present in bin directory, intellisense etc not work.

instead of modify web.config, may try register control @ page(aspx) or control(ascx) level adding register directive after page directive:

<%@ register assembly="ae" namespace="customwebcontrols" tagprefix="customddl" %> 

Comments