dropdownlist的问题我实现了ajax不刷新更新数据,但是我怎么用ddldownlist.selectValue;服务器的方法来获取ddldownlist.选中的值呢
我更新第二个下拉框是改变html的值
是<option >
我用ddldownlist.selectValue回报错
是不是得改viewstate的值呢怎么改呢
我更新第二个下拉框是改变html的值
是<option >
我用ddldownlist.selectValue回报错
是不是得改viewstate的值呢怎么改呢
解决方案 »
- 前台控件在后台cs中找不到的问题?
- uniqueidentifier与nvarchar类型转换.
- 关于DataAdapter配置向导问题。@ 变成 ?
- The ConnectionString property has not been initialized
- 分析器错误信息: 未能加载类型“wjm.Global”。
- asp.net 问题
- 显示页脚后,在datagrid中自动增加了一列?原因?
- 操作XML的一个问题
- 高分求像股票一样的那种实时走势图!急!思归大侠帮帮忙!.....
- 各位请留神:为什么我新建一个项目后,什么也不写,它都无法调试(分不是问题)
- 求组表结构设计问题
- 简单正则表达试问题
然后在onselectedindexchanged里抓不到值對嗎?
貼代碼。
2.Updatepanel的Trriger事件要添加!<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" ></asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
</form>protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = DropDownList1.SelectedValue;
}
用过几次不好用,主要是不习惯
我是想如何改变下viewstate的值
然后就可以用selectValue来取值了