Managing custom controls

iversr

New member
Joined
Jan 29, 2008
Messages
1
Programming Experience
10+
My question has to do with managing the code for custom controls. Not so much with how to develop the control, but how to reference/register etc. This question involves both VB and ASP.net so I wasn't quite sure where to ask, thought I would start here. I'm a self taught VB/ASP programmer so I'm probably missing something simple.

I developed a custom validator control for use on an ASP web page. I placed the control in the App_Code director and everything was fine. It works as expected. Then my problem began.

I have another sub-directory in my web page folder called Controls. These are custom web controls. I need to use my custom validation control in one of these web controls. I can't figure out how to register or reference the customer validator so that the custom web controls can see it. I've tried the "register" command at the beginnig of the aspx file, no luck. I've tried all sorts of things based on many hours of internet research but none of them allow it to work. I suspect my problem is in my directory structure but am not sure. I have to admit I am weak on the whole process of developing and implementing custom controls, either web or otherwise. Here's my directory structure if it helps to understand my problem.

WebPageProject
TestPage.aspx
App_Code
CustomValidator.vb
...
Controls
CustomControl.aspx
...

I want to use CustomValidator.vb in CustomControl.aspx. I was able to use CustomValidator.vb in TestPage.aspx with no problem.

If anyone knows of a good tutorial or a good book that teaches custom control developement and implementation, I would appreciate any references.

Thanks,

rivers54
 
Back
Top