Html ‘Select’ control always returnh selected index as 0

Tags: , , ,
Posted in dotnet, vb, vb.net | No Comments »

I have placed HTML ‘Select’ control on aspx page and it’s items(options) are loaded dynamically using javasvript. The items in dropdown appear properly on web page. But when I select any item from dropdown, it’s selected index is not returned in aspx.cs file. In fact, it shows selected index as 0 and size of ‘Select’ html control as -1.
I have inserted the javascript(which inserts items in dropdown) in body tag. I also tried by calling javascript function on Body onload. But it didn’t help.
Please advice.

Similar:

  1. how do a select option selection pick from some other page using html and js only? Hi friends, I have to main pages in html with course details. One (X) page has html select option with all courses. If i select...
  2. On selected index change in Dropdownlist1 should select same value in Dropdownlist2 ? Hi , I Have a page where there are two Dropdownlist and both have the same data in it but when user selects the value...
  3. I can’t prevent key presses from changing a selected option in Firefox Using Firefox 3.5.7 The following test page should behave like Opera, Safari and Chrome. Key presses (arrows or 1-5) should have no effect (i.e. The...
  4. ListView – Index and Position Behavior upon restart() I am using a ListView with an ArrayAdapter that holds objects. When I select an item, I am capturing the position and index of the...
  5. How to enable html select post back apsx page when selection changed? With asp.NET control dropdownlist, there is a property AutoPostBack, if it is set “True”, the whole page will be posted back. If the aspx page...

Tags: , , ,

Leave a Reply