c# - What does setting the SelectedIndex to -1 on a drop down list do? -


i have simple question here. have seen drop down list indexes set -1 when being reset.

what line of code doing?

mydropdownlist.selectedindex = -1; 

how can set value less 0?

thank you!

-1 indicates there no selectedindex . setting selectedindex -1 show first item in list when load page.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -