asp.net c#有没有办法 在后台cs代码里 直接 得到
前置aspx的 页面的 select的下拉框的值 (web页面)(ajax可以做到 但当前cs逻辑ajax用太多。 思考如果能用在后台cs代码里 直接 得到 前置aspx的 页面的 select的下拉框的值
这个方法是最好的 )
前置aspx的 页面的 select的下拉框的值 (web页面)(ajax可以做到 但当前cs逻辑ajax用太多。 思考如果能用在后台cs代码里 直接 得到 前置aspx的 页面的 select的下拉框的值
这个方法是最好的 )
<select id="citysel">
<option value="1"> ....</option>
...
</select>
后台 protected void Button1_Click(object sender, EventArgs e) { //---------------------------需要不用 ajax 能否 直接得到 客户端 select 的值???
asp:dorpdownlist 直接就有下拉选择事件
<asp:DropDownList ID="ddlIsDaoHang" runat="server" Width="128px">
<asp:ListItem Value="0">是</asp:ListItem>
<asp:ListItem Value="1">否</asp:ListItem>
</asp:DropDownList>
后台获取 string id= ddlIsDaoHang.SelectedValue;
<input ID="tbedu" runat="server" name="tbedu" type="text">
<select id="ddledu" name="ddledu" onchange="document.getElementById('tbedu').value=this.options[this.selectedIndex].text" runat="server" tabindex="-1"></select>
然后取 tbedu的值 tbedu.Value
<div style="margin-top: 1px; height: 22px">
<input ID="tbedu" runat="server" style="width: 84px; position: absolute; height: 20px" class="pin" name="tbedu" type="text">
<select style="width: 100px; clip: rect(auto auto auto 83px); position: absolute; height: 20px" id="ddledu" name="ddledu" onchange="document.getElementById('tbedu').value=this.options[this.selectedIndex].text" runat="server" tabindex="-1">
</select>
</div>