Controlling Datalist Items after render with Javascript

G

Guest

I have the need to perform some javascript code on a rendered datalist.
However, the problem is that the objects that I want to control via
javascript have been given unique names when the datalist is rendered, for
example, txtInput control in my datalist item template is now called
txtInput_ctl59 since .Net has to give each input box a unique ID when
rendering. So my question is, how to I use javascript to control the dom
from a rendered dataset when I don't know how to reference the control names?
I could give them unique names and perform a substring to
getElementByID....just like the gold old classic ASP days. I love .Net, but
some of newer features such as the DataList, DataGrid, and Repeater only make
our lives more difficult.... I'd like to hear some clever solutions in
getting around this....

Just my opinion. Any other thoughts or ideas?
 

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,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top