【提问】关于DropDownList的经典提问。 俺听说.NET里面不像Win32里面那样要自己写函数就可以做到,是吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 DropDownList1.Items.FindByValue("AAA").Selected = true; DropDownList1.Items.FindByValue(传递过来的DataValueField的值).Selected = true; foreach(ListItem item in this.DropDownList1.Items){ if(int.Parse(item.Value)=="你要的value值") { break; }}返回的item就是选择的值。 DropDownList1.SelectedValue="你要的值"; 经典回答:DropDownList1.Items.FindByValue(传递过来的DataValueField的值).Selected = true; 经典回答:DropDownList1.Items.FindByValue(传递过来的DataValueField的值).Selected = true;OK! 問題解決,散分! 关于APSX提交数据的问题 时间相加问题 c#菜鸟提问? ASP的东西显示在.NET上的 问题 框架页如何记住子页面的状态? 为什么不刷新? SQL语句未结束,但我发现不了错误!~~~~~~`重谢 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 在ie11不管用 我想自学ASP.NET,各位大大们推荐几本书给我吧! 关于在ASPX中加入media player 的问题1!!! 菜鸟问题,在线等... javascript验证的问题!!!急。。
{
if(int.Parse(item.Value)=="你要的value值")
{
break;
}
}
返回的item就是选择的值。
DropDownList1.Items.FindByValue(传递过来的DataValueField的值).Selected = true;
DropDownList1.Items.FindByValue(传递过来的DataValueField的值).Selected = true;OK! 問題解決,散分!