Web User Control with CustomValidation and Javascript

Discussion in 'ASP .Net Building Controls' started by Craig Buchanan, Aug 18, 2008.

  1. I have a Web User Control (.ascx file) that I need to valid using a
    CustomValidation control. Moreover, I would like use client and server
    validation, if possible. I have the logic for the server-side validation
    working correctly. I also have the have the client-side validation working
    once the control is embedded in a page. I would like to move the validation
    from the aspx page to the ascx page, but I'm concerned that the
    GetElementById() method will have an issue.

    A couple of questions:
    * can I build Javascript coding into the ascx page in a way that it will
    work correctly however the control is embedded?
    * can I switch between server and client validation programmatically,
    meaning disable on mechanism and enable another?

    Any thoughts would be appreciated. Thank you.

    Craig buchanan
    Craig Buchanan, Aug 18, 2008
    1. Advertisements

  2. Hi Craig
    What kind of issues?
    Yes of course
    Peter Bucher [MVP], Sep 10, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.