I have been trying to get the selected item value from a dropdownlist but it seems like it is not going to work. I have looked at the other topics and I know that this question has been asked several times, but I need help. I have tried the following code:
$('ddlWorkHourFact option:selected').val()
but it returns me "undefined" and I don't know why.
Here is my dropdownlist:
<asp:DropDownList ID="ddlWorkHourFact" runat="server">
<asp:ListItem Value="7" Text="7">7</asp:ListItem>
<asp:ListItem Value="8" Selected="True" Text="8">8</asp:ListItem>
<asp:ListItem Value="9" Text="9">9</asp:ListItem>
</asp:DropDownList>