如何循环读取listbox 的各项? listbox可以选多项,但是如何读取它被选中的各个项呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 foreach(ListItem oItem in ListBox1.Items) { if(oItem.Selected) { Response.Write(oItem.Value+"<BR>"); } }=============我的签名 foreach(ListItem oItem in ListBox1.Items) { if(oItem.Selected) { Response.Write(oItem.Value+"<BR>"); } }=============我的签名 a.SelectedValue循环度曲dim i as integerfor i=0 to a.items.count-1 response.write (a.Items(i).Value)next foreach(ListItem oItem in ListBox1.Items) { if(oItem.Selected) { Response.Write(oItem.Value+"<BR>"); } } for( int i=0;i < ListBox1.Items.Count; i ++ ) { if( ListBox1.Items[i].Selected ) { Response.Write( " 当前选定的项值为:" + ListBox1.Items[i].Text + "<br>"); } 象ListBox1.Items.Count、ListBox1.Items[i]这样的,最好能定义个变量,这样效率会高一些 .net 怎么用ajax读取sql server数据库里的数据,然后再传回前台页面显示 真心菜鸟写了点击登录的代码。但是怎么验证呢。。验证成功后跳转的代码又该怎么写呢 我这到写关闭数据库连接为什么出错呢?? 熟悉正则的朋友请进来,高难度问题! 扇贝武器娃地干活地进来 VS2005怎么制作工具条? 提交不了数据库,SQLSERVER 招聘高手,高薪 custom control & user control 精确定位问题 为什么我的Session不管用(解决问题一定给分) 请用过三楼楼长老兄oa系统的大侠帮一下忙,谢谢! 100分 求asp.net 连接池的用法
{
if(oItem.Selected)
{
Response.Write(oItem.Value+"<BR>");
}
}
=============
我的签名
{
if(oItem.Selected)
{
Response.Write(oItem.Value+"<BR>");
}
}
=============
我的签名
dim i as integer
for i=0 to a.items.count-1
response.write (a.Items(i).Value)
next
{
if(oItem.Selected)
{
Response.Write(oItem.Value+"<BR>");
}
}
{
if( ListBox1.Items[i].Selected )
{
Response.Write( " 当前选定的项值为:" + ListBox1.Items[i].Text + "<br>");
}