我有2個dropdowmlists其中的ASPX代碼結合年份和月份
<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>
這兒如果我選擇year as 2
和month as 5
我want to save it as 2.5
。如果我選擇year as 3
和month as 9
我want to save it as 3.9
和那樣。
請幫我解決這個問題。
好的建議是可觀的。
'Label4'和'Label5'顯示''ddl'選擇value'是嗎? –