I have 2 dropdowmlists where its aspx code is
<asp:DropDownList ID="ddlexpyear" runat="server" Width="50px" TabIndex="4"
DataTextField="" DataValueField="" AppendDataBoundItems="true"
ValidationGroup="userinfo" DataSourceID="objectdatasource1"
onselectedindexchanged="ddlexpyear_SelectedIndexChanged">
<asp:ListItem Value="-1">--- Please select ---</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Label4" runat="server" Text="(Year)"></asp:Label>
<asp:DropDownList ID="ddlexpmonth" runat="server"
AppendDataBoundItems="true" DataSourceID="objectdatasource2"
DataTextField="" DataValueField="" TabIndex="4"
ValidationGroup="userinfo" Width="50px"
onselectedindexchanged="ddlexpmonth_SelectedIndexChanged">
<asp:ListItem Value="0">--- Please select ---</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Label5" runat="server" Text="(Month)"></asp:Label>
<sup style="color: Red;">*</sup> </td>
Here if i select year as 2 and month as 5 I want to save it as 2.5. And if i i select year as 3 and month as 9 i want to save it as 3.9 and like that.
Please help me to solve this.
Good suggestion is appreciable.
You have to do this by two way
(1) One way using
dropdownlistSelectedItempropety(2) Another way using
dropdownlistSelectedValuepropetyIf google then you have definitely find out.
I hope it’s help you.