zoukankan
html css js c++ java
CheckBoxList取值及勾选上
string
strrighgs
=
""
;
for
(
int
i
=
0
; i
<
this
.cblrighgs.Items.Count; i
++
)
{
if
(
this
.cblrighgs.Items[i].Selected
==
true
)
{
strrighgs
+=
this
.cblrighgs.Items[i].Value
+
"
|
"
;
}
}
string
str
=
""
;
foreach
(ListItem li
in
cblrighgs.Items)
{
if
(li.Selected
==
true
)
{
str
+=
li.Value
+
"
;
"
;
}
}
Response.Write(str);
Response.End();
勾选上:
string
[] strtemp
=
strapp.Split(
'|
'
);
foreach
(
string
str
in
strtemp)
{
for
(
int
i
=
0
; i
<
cblrighgs.Items.Count; i
++
)
{
if
(
this
.cblrighgs.Items[i].Value
==
str)
{
this
.cblrighgs.Items[i].Selected
=
true
;
}
}
}
查看全文
相关阅读:
css选择器解析规则
swiper轮播图包含视频或图片
css实现文字选中变色
swiper鼠标滚轮事件
C语言中,关于相除的问题
输入测试字符型数据的组数,再输入字符型数据,排坑
C语言中,字符型数字与常数型数字的加减实现
C语言的指针用法:输入一堆字符,把非字母的删去。
C语言中倒序输出你输入的数。
C语言中,嵌套的if语句的一些经验...
原文地址:https://www.cnblogs.com/cnaspnet/p/751293.html
最新文章
linux net
netlink
设备驱动模型
quickSort
零中频接收机
class AB
芯片边界效应STI、LOD与WPE
浮点数定点化
AMS仿真
笔记
热门文章
基于ARC处理器的SOC前端设计总结
vcs仿真
工艺角仿真问题
时钟无缝切换
去掉网页一直点击出现蓝色背景的效果
父元素中含有transform,position:fixed失去作用
圆弧形内容切换
video在ios和Android下播放情况
css实现文本两端对齐
scale 与 transfrom-origin配合出现奇特效果
Copyright © 2011-2022 走看看