Count of no. of dropdowns selected

Feb 12 2014 1:10 AM
I have a gridview, inside which one column comprises of a dropdownlistbox:
<asp:TemplateField HeaderText="Choose Employer" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="15%"> <ItemTemplate> <asp:DropDownList runat="server" ID="cboEmployer" CssClass="textEntry" AutoPostBack="true" OnSelectedIndexChanged="cboEmployer_SelectedIndexChanged" onclick="javascript:shouldsubmit=false;" Width="80%"></asp:DropDownList> </ItemTemplate> </asp:TemplateField>

Lets say the dropdown has some values like 'A','B' and 'C'.

My requirement is: on click of a button (outside the grid), I need to get the total number of rows for whichEmployer A is selected. How do I do this?