how can I find the itemindex in a datalist whilst I am in the item template
Given a datalist and has the item template populated with a textbox and a Button
I want to pressthe button so the form will display the value found in the textbox
many proposals say
Thank you Avnish, but this will not solve the qustion onhand. On the same cell (amongst other 10 cells in a datalist) I have label1 and textbox1 and command 1. I want to click on commans1 click event and want it to display the value in textbox1 of that specificly selected cell. so I am not in the selectedvalue stage here, I am interpreting values withing the cell itself. Hope this clarifies it more.
All reseraches I am making are pointing to this type of solution
((TextBox)DataList.Items(item_index).FindControl("StudentID")).Text;
HOw can I get this item_index valu whilst I a m in the cell
http://bytes.com/groups/net-asp/318590-setting-itemtemplate-value-datalist-item-index