select
ボタンをクリックした後、タグから選択した値を取得するにはどうすればよいですか? select
ここでは、複数選択でhtml を取得します。
selTest.Value
最初に選択された項目のみを返します。
<select runat="server" id="selTest" name="selTest" data-placeholder="Choose a Country..." class="chzn-select" style="width:350px;" tabindex="4">
<option value=""></option>
<option value="United States" selected="selected">United States</option>
<option value="Western Sahara">Western Sahara</option>
<option value="Yemen">Yemen</option>
<option value="Zambia" selected="selected">Zambia</option>
<option value="Zimbabwe" selected="selected">Zimbabwe</option>
</select>
<asp:Button ID="testBt" runat="server" OnClick="testBt_Click" Text="ds" />
コードビハインド:
protected void testBt_Click(object sender, EventArgs e)
{
}