Wednesday, April 7, 2010

how to use java script in asp.net page

The names of the controls inside a usercontrol get renamed when they're rendered on the page (rt click & ViewSource to see it) so you need to code the field name. You can do this:



var vdp = document.getElementById('<%= dp.ClientID %>');


alert(vdp.value);

No comments:

Post a Comment