Adding attribute to JavaScript validator object in the Page_Valida

Discussion in 'ASP .Net Web Controls' started by JimOx, Jun 21, 2006.

  1. JimOx

    JimOx Guest

    I have created a custom validator control that implements the
    BaseValidator. However I would like to add an attribute to the
    JavaScript validation object that is rendered at the bottom of the
    page. Currently something like the following is at the bottom of the
    page:

    var ctl00_MasterPages_MemberSelected = document.all ?
    document.all["ctl00_MasterPages_MemberSelected"] :
    document.getElementById("ctl00_MasterPages_MemberSelected");
    ctl00_MasterPages_MemberSelected.errormessage = "This is an error
    message";
    ctl00_MasterPages_MemberSelected.display = "Dynamic";
    ctl00_MasterPages_MemberSelected.validationGroup = "ValidationGroup";


    I would like to add attributes to this object, for example:


    ctl00_MasterPages_MemberSelected.newAttributeOne = "Attribute1";
    ctl00_MasterPages_MemberSelected.newAttributeTwo = "Attribute2";


    Does anyone know how this can be done?
     
    JimOx, Jun 21, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Ox
    Replies:
    1
    Views:
    2,478
    =?Utf-8?B?SmltT3g=?=
    Jun 22, 2006
  2. johnny
    Replies:
    5
    Views:
    726
    johnny
    Dec 10, 2006
  3. Marc Aymerich
    Replies:
    0
    Views:
    73
    Marc Aymerich
    Nov 24, 2013
  4. Devin Jeanpierre
    Replies:
    12
    Views:
    109
    Steven D'Aprano
    Nov 24, 2013
  5. Chris Angelico
    Replies:
    0
    Views:
    64
    Chris Angelico
    Nov 24, 2013
Loading...

Share This Page