B
Beemer Biker
I am adding at bindtime an htmlbutton and an html dropdownlist. The idea is
to select the item in the list, hit the button and my callback code uses the
ID.selectedindex to act on the item that was selected. I tested it all out
by dropping a button and a DDL on a form. Worked ok. Then I wrote the code
that automatically added the the button and the DDL to a templated column.
The button callback works just fine, but document.getelementbyid returns
null. I know how to make this work if I replace the client side objects
with server side. I just thought I could do it on the client side and avoid
postbacks. I guess I could store the value of the DDL during an onchange
somewhere and then the button would get that value (or 0 if nothing was
changed???)
Is there a better way to handle this? Seems there should be some way the
button callback could get the value of the index that was selected. Maybe I
am doing something wrong?
...TIA..
to select the item in the list, hit the button and my callback code uses the
ID.selectedindex to act on the item that was selected. I tested it all out
by dropping a button and a DDL on a form. Worked ok. Then I wrote the code
that automatically added the the button and the DDL to a templated column.
The button callback works just fine, but document.getelementbyid returns
null. I know how to make this work if I replace the client side objects
with server side. I just thought I could do it on the client side and avoid
postbacks. I guess I could store the value of the DDL during an onchange
somewhere and then the button would get that value (or 0 if nothing was
changed???)
Is there a better way to handle this? Seems there should be some way the
button callback could get the value of the index that was selected. Maybe I
am doing something wrong?
...TIA..