Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / June 2007

Tip: Looking for answers? Try searching our database.

Custom Composite Web Control and Validator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 02 Jun 2007 06:08 GMT
Hello,

I built a composite web control that has a textbox and a date
control.
added my custom control on a webform where there are other standard
controls.
Each control on the form has a required validator.
I need to have a validator for my custom control, but don't know how
to do this.
I added a CustomValidator to the form, but in design mode, my custom
control doesn't appear in the list of controls of the validator.
Any help to work around this will be greatly appreciated.

Thanks,

Rick
Riki - 04 Jun 2007 13:31 GMT
> Hello,
>
[quoted text clipped - 8 lines]
> control doesn't appear in the list of controls of the validator.
> Any help to work around this will be greatly appreciated.

For a CustomValidator, there's no need to indicate a ControlToValidate.
Just leave it blank.
It's your custom validation code that will decide which values it's going to
check.

Signature

Riki

Rick - 11 Jun 2007 15:09 GMT
> > Hello,
>
[quoted text clipped - 17 lines]
>
> Riki

Hi Riki,

Thanks. I did as you said, and set the args.IsValid accordingly in the
custom validator's event handling sub, but I must be missing something
b/c the event for the custom validator isn't getting fired. I have a
breakpoint in this event and it isn't stopping there. I'm new to aspx
and I'd appreciate any help to make this user control work with the
validator.

Thank you in advance,

Rick

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.