Module <asp:Label ID="lbl_Name1" runat="server" ForeColor="Red" Text="*"></asp:Label> </td><td><asp:TextBox ID="txtmodule" runat="server" Width="193px" class="required" ></asp:TextBox></td></tr> Parameter Type <asp:Label ID="lbl_Name2" runat="server" ForeColor="Red" Text="*"></asp:Label> </td><td><asp:TextBox ID="txtparameterType" runat="server" Width="193px" class="required"></asp:TextBox></td></tr> <tr><td> Parameter Value <asp:Label ID="lbl_Name3" runat="server" ForeColor="Red" Text="*"></asp:Label> </td><td><asp:TextBox ID="txtparameterValue" runat="server" TextMode="MultiLine" class="required"></asp:TextBox></td></tr> <tr> parameters </td> <td> <asp:DropDownList ID="ddl_parvalues" runat="server"> <asp:ListItem Value="">--select--</asp:ListItem> <asp:ListItem Value="parameter1">value1</asp:ListItem> <asp:ListItem Value="parameter2">value2</asp:ListItem> </asp:DropDownList> </td> </tr> parametertype </td> <td> <asp:DropDownList ID="ddl_parmtype" runat="server"> <asp:ListItem Value="">--select--</asp:ListItem> <asp:ListItem Value="type1">ParamType1</asp:ListItem> <asp:ListItem Value="type2">ParamType1</asp:ListItem> </asp:DropDownList> </td> </tr> here i am using 2 dropdownlist,but in my proj we are using more than 5 dropdownlist and even declare every dropdownlist id into jquery is littelbit tuf job,please help me and this is jquery with class <pre lang="xml"><script type="text/javascript"> $(document).ready(function() { $('#' + '<%= btnSave.ClientID %>').click(function(e) { var isValid = true; $("'input[type='text'].required', 'input[type='textarea'].required'").each(function() { if ($.trim($(this).val()) == '') { isValid = false; $(this).css({ "border": "1px solid red", // "background": "#FFCECE" }); } else { $(this).css({ "border": "", "background": "" }); } }); if (isValid == false) e.preventDefault(); else alert('Thank you for submitting'); }); }); </script></pre> here i am going display red colour border line when user going to save button without fill any textbox and multiline textbox field,,but this jquery is working for textbox and multiline textbox but its not working when usernot select any value from dropdownlist so,,please help me How Get selected value of dropdownlist in jquery,and here i am taking value of textbox and textarea, but i dont know how to get selected value of drop downlist in jquery
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)