Adding attribute to JavaScript validator object in the Page_Valida

J

JimOx

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?
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top