|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Getting the selectedIndex of a datalist
By default the selectedIndex porperty is set to -1. I have a datalist in which the user has select by clicking on an image button. I tried to use the selectedIndex porperty, thinking that it might give me the index of the row on which the user clicked on, but instead it returns the defaut value, which is '-1'.
How can i get the value of the index the user clicked on? |
|
#2
|
|||
|
|||
|
-1 is used to deselect an item in a DataList. If your DataList is returning -1, I would hazard a guess that perhaps nothing in the DataList itself is actually selected?
Have you looked at using SelectedItem instead? |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Getting the selectedIndex of a datalist |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|