|
Question : ListBox Selected Index from Javascript
|
|
Dear Experts
i am using ASP.NET 2.0 JavaScript C#
i want to get the selected index change event for list box by javascript i want to know the name of the event.
thank you
|
|
Answer : ListBox Selected Index from Javascript
|
|
Add alist box as shown
atem> btem> ctem> Add a javascript function function Selection(){ var List= document.getElementById('ListBox1'); alert(List.options[List.selectedIndex].value); } Then in code behind ,
ListBox1.Attributes.Add("onchange", "Selection();");
|
|
|