A very easy one but i find it very difficult.I have one drop down in which values generated at runtime.
<select id="cmbCitySub" name="cmbCitySub" multiple="multiple">
<asp:Literal ID="litCitySub" runat="server"></asp:Literal>
</select>
I have used jquery multiselect plugin in drop down.
$('#cmbCitySub').multiselect({
noneSelectedText: 'Select CitySub',
selectedList: 1,
multiple: false
}).multiselectfilter();
My above drop down is optional i.e. if user doesnt select any value default 0 should be set . i have tried it in jquery BUT FAILED...!!
if ($('#cmbCitySub').val() == null)
{
$('#cmbCitySub').val('0');
}
var sCitySub = $('#cmbCitySub').val();
alert(sCitySub);