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?
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?