[2008] Placing an inherited control on page
I have a control that inherits from a RegularExpressionValidator and I need an instance of it on a page, but from what I can tell you can't add this without creating it in a separate library and adding the library to your toolbox and dropping an instance on your page.
I could add it through the code-behind but there are problems with the ControlToValidate property of Validators.
I know it's fairly straightforward to create a separate library to house the control but I can't justify that just for one control.
Re: [2008] Placing an inherited control on page
You can make it a class in your existing solution and that control should then be available to you when you reference your own assembly. I assume you'll be adding a reference to it in your web.config?
Re: [2008] Placing an inherited control on page
Quote:
Originally Posted by mendhak
You can make it a class in your existing solution and that control should then be available to you when you reference your own assembly. I assume you'll be adding a reference to it in your web.config?
I can't reference the assembly of the web project to itself because there is no dll output. If there is a way, I don't know of one.
Re: [2008] Placing an inherited control on page
Then either convert your project to a web application project rather than a website project, or (if you can't justify the creation of another class library), make a web user control.