Click here to Skip to main content
15,888,293 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends.

Suppose, I have one custom control. I add this tow control in the page.
Now, I want to write javascript in custom control class that access this controls and add into array.

For example.
If you take tow RequiredFieldValidator control on the page and check javascript in viewsource, You will see something like below script.

JavaScript
<script type="text/javascript">
//<![CDATA[
var Page_Validators =  new Array(document.getElementById("req1"), document.getElementById("req2"));
//]]>
</script>


RequiredFieldValidator1 control Id is req1 and
RequiredFieldValidator2 control id is req2 and both controls are added into Array.

Thanks
Imrankhan

Edit TR : Please use <pre> tags to format your code.
Posted
Updated 22-Apr-10 2:35am
v2

Do you want to write how many of your custom control has been added to page into array?
 
Share this answer
 
Yes. But code should be in self custom control.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900