ListBox 取不到值..........在线等

ziyouren521125 2010-01-15 01:43:40

<asp:ListBox ID="SKQY" runat="server" Width="170px" Rows="10" CssClass="style1">
<asp:ListItem Selected>无要求</asp:ListItem>
<asp:ListItem>海淀</asp:ListItem>
<asp:ListItem>朝阳</asp:ListItem>
<asp:ListItem>东城</asp:ListItem>
<asp:ListItem>西城</asp:ListItem>
<asp:ListItem>崇文</asp:ListItem>
<asp:ListItem>宣武</asp:ListItem>
<asp:ListItem>丰台</asp:ListItem>
<asp:ListItem>石景山</asp:ListItem>
<asp:ListItem>房山</asp:ListItem>
<asp:ListItem>门头沟</asp:ListItem>
<asp:ListItem>通州</asp:ListItem>
<asp:ListItem>昌平</asp:ListItem>
<asp:ListItem>密云</asp:ListItem>
<asp:ListItem>怀柔</asp:ListItem>
<asp:ListItem>延庆</asp:ListItem>
<asp:ListItem>平谷</asp:ListItem>
<asp:ListItem>大兴</asp:ListItem>
<asp:ListItem>顺义</asp:ListItem>
<asp:ListItem>aaaaaaaa</asp:ListItem>
</asp:ListBox>
<input type="button" name="button" id="button1" value="添加>>" onclick="return addloc(document.form1.SKQY,document.form1.selectSKQY)" />
<asp:ListBox ID="selectSKQY" runat="server" Width="170px" Rows="10" CssClass="style1"></asp:ListBox>



上面是从listbox1 添加到后面的listbox2
现在可以添加上值,但是我去再后台却取不到值。
用items.count()确等于0

是什么情况啊?
在线等
...全文
117 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
hablanlin 2010-11-15
  • 打赏
  • 举报
回复
js怎么传值给后台呢?
Dream_Hunter_ 2010-01-15
  • 打赏
  • 举报
回复
要取值的话也在js里取,然后再返回给后台。
十八道胡同 2010-01-15
  • 打赏
  • 举报
回复
客户端的东西 在没发送到服务器端之前获得不到的
xiaosuper 2010-01-15
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 ziyouren521125 的回复:]
引用 1 楼 ttg520 的回复:
你添加是用js的吗?    后台肯定取不到了

是用的js
为什么啊?
[/Quote]
++
chenyunkun2008 2010-01-15
  • 打赏
  • 举报
回复
删除重新添加

试下
BaoShiqiang 2010-01-15
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 zhulong1111 的回复:]
引用 3 楼 talesten 的回复:
你取的值都还在客户端,没发送至服务器,当然取不到啊引用 1 楼 ttg520 的回复:
你添加是用js的吗?    后台肯定取不到了
[/Quote]mark
vip__888 2010-01-15
  • 打赏
  • 举报
回复
客户端操作 后台是不知道的
jack15850798154 2010-01-15
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 talesten 的回复:]
你取的值都还在客户端,没发送至服务器,当然取不到啊引用 1 楼 ttg520 的回复:
你添加是用js的吗?    后台肯定取不到了

[/Quote]
顶!!!!
ziyouren521125 2010-01-15
  • 打赏
  • 举报
回复


哦。这个问题给忘了
zhulong1111 2010-01-15
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 talesten 的回复:]
你取的值都还在客户端,没发送至服务器,当然取不到啊引用 1 楼 ttg520 的回复:
你添加是用js的吗?    后台肯定取不到了

[/Quote]mark
TalesTen 2010-01-15
  • 打赏
  • 举报
回复
你取的值都还在客户端,没发送至服务器,当然取不到啊[Quote=引用 1 楼 ttg520 的回复:]
你添加是用js的吗?    后台肯定取不到了
[/Quote]
ziyouren521125 2010-01-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 ttg520 的回复:]
你添加是用js的吗?    后台肯定取不到了
[/Quote]
是用的js
为什么啊?
ttg520 2010-01-15
  • 打赏
  • 举报
回复
你添加是用js的吗? 后台肯定取不到了

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧