Hi,
I have an arraylist(al) in which I have some values. I want to populate these values in my dropdown list. I have used the following code
I gets populaated but when i want to print its value it shows blank.
Can anybody tell me the reason and some other alternative to populate the dropdown so that i can get the selected value.
Thanks
I have an arraylist(al) in which I have some values. I want to populate these values in my dropdown list. I have used the following code
Code:
<select name="select">
<%for(int i=0;i<al.size();i++){%>
<Option value="<%al.get(i);%>"><%=al.get(i)%></Option>
<%}%>
</select>
I gets populaated but when i want to print its value it shows blank.
Can anybody tell me the reason and some other alternative to populate the dropdown so that i can get the selected value.
Thanks
Comment