|
-
Sep 16th, 2008, 08:37 AM
#1
Thread Starter
Frenzied Member
[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.
-
Sep 17th, 2008, 12:35 PM
#2
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?
-
Sep 17th, 2008, 12:55 PM
#3
Thread Starter
Frenzied Member
Re: [2008] Placing an inherited control on page
 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.
-
Sep 17th, 2008, 02:19 PM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|