//code in aspx.
</asp:TemplateField>
:
:
:
<ItemTemplate>
<asp:DropDownList ID="didDdl" runat="server"
DataSourceID="departmentsDataSource"
DataTextField="Department"
DataValueField="DepartmentID"
SelectedValue='<%# Bind("DepartmentID") %>'
Enabled="False" />
</ItemTemplate>
</asp:TemplateField>
Q:I have to insert the selected dropdownlist items to a table all at a once i.e when i click a submit button(which i have not shown here) then all the selected values should go at a time to a table.
My assumption is you are using Gridview. So this will work.
Improvised solution