for(int i=0;i<=this.CHRight.Items.Count-1;i++)
{
if(this.CHRight.Items[i].Selected)
{
role.Right+=this.CHRight.SelectedItem.Text.ToString()+","; }
}
好像不行吧!
{
if(this.CHRight.Items[i].Selected)
{
role.Right+=this.CHRight.SelectedItem.Text.ToString()+","; }
}
好像不行吧!
解决方案 »
- b/s,报表,了解或做过的进
- 如何将两个时间段的日期 按月,按季度,按年 返回
- https://... 认证的网页,显示第三方控件时,如何去除弹出“含有不安全的内容。。”等的提示? ###100分##
- 关于文件上传的问题
- 请教关于asp.net中数据缓存文件依赖的问题
- 献分:求 各种c#.net系统源码系统下载!
- cookie保存用户状态后如何加密cookie保证信息不被窃取?
- 怎样用在codebehind中操作控件的OnClick?
- 关于框架的问题?
- SOS:asp.net中操作EXCEL的问题
- 全局变量
- *************如何在加载IE窗体的时候,隐藏工具栏和菜单*************
#region CheckBoxList
/// <summary>
/// 获取CheckBoxList选中的值
/// </summary>
/// <param name="cbl"></param>
/// <returns></returns>
public static string GetCheckBoxList(CheckBoxList cbl)
{
string _retval = string.Empty; foreach (ListItem item in cbl.Items)
{
if (item.Selected)
_retval += item.Value + ",";
} _retval = _retval.Remove(_retval.LastIndexOf(","), 1);//删除最后一个"," return _retval;
}
/// <summary>
/// 重置CheckBoxList
/// </summary>
/// <param name="cbl"></param>
public static void ResetCheckBoxList(CheckBoxList cbl)
{
foreach (ListItem item in cbl.Items)
{
item.Selected = false;
}
} /// <summary>
/// 给CheckBoxList赋初始值
/// </summary>
/// <param name="cbl"></param>
/// <param name="strArr"></param>
public static void SetCheckBoxList(CheckBoxList cbl,string[] strArr)
{
//赋值之前先把原有的值给清除
ResetCheckBoxList(cbl); foreach (string val in strArr)
{
if (val != "")
{
foreach (ListItem item in cbl.Items)
{
if (item.Value == val)
item.Selected = true;
}
}
}
}
#endregion
for(int i=0;i <=this.CHRight.Items.Count-1;i++)
{
if(this.CHRight.Items[i].Selected)
{ ss+=this.CHRight.Items[i].value+"|";
}