1、我用TreeView做权限设置
根据管理员选择借点来生成权限字符串,但是我选择节点的Checkbox后遍历时却发现仍然为false
说是没有回发,就照着网上说的用JS来PostBack,但是这样虽然触发了TreeNodeCheckChanged,这样每点击一个节点均会触 发这个事件,生成的字符串又是不对的
求高手支招,有没有别的简易的方法来满足这样的需求呢
2、有时候网页关闭了,他马上弹出一个正在连接的空白网页,这样的话在运行就会弹出无法启动程序"http:/localhost:2844/xxxx",是什么原因呢,怎样彻底的关闭,就像Process.GetCurrentProcess().Kill();
根据管理员选择借点来生成权限字符串,但是我选择节点的Checkbox后遍历时却发现仍然为false
说是没有回发,就照着网上说的用JS来PostBack,但是这样虽然触发了TreeNodeCheckChanged,这样每点击一个节点均会触 发这个事件,生成的字符串又是不对的
求高手支招,有没有别的简易的方法来满足这样的需求呢
2、有时候网页关闭了,他马上弹出一个正在连接的空白网页,这样的话在运行就会弹出无法启动程序"http:/localhost:2844/xxxx",是什么原因呢,怎样彻底的关闭,就像Process.GetCurrentProcess().Kill();
解决方案 »
- 为什么我就不能用iis7打开网站,但是能有vs自带的那个正常打开
- 关于图片存取(数据库)的问题
- div + gridview 的100%宽度问题
- 好消息,腾讯7周年活动,现在开放六位数的QQ免费申请,你快去申请一个呀!晚了可没靓号了。
- 有关于DataAdapter的使用问题!!!
- 孟子e章!为什么我将你的“温馨提示”页面后?点击页面上任何一个按钮,它就会又弹出来一次的?
- 关于页面刷新问题 急啊! 在线等
- 菜鸟求高手帮忙
- 在IE运行asp.net的问题
- Asp.net文件上传之前获取文件的大小
- avast影响Visual Studio 2008调试异常?
- 使用AspNetPager控件,出现JS错误:doCheckPageSize is not defined
怎样解决 或者有么有别的好的方法实现权限设置2、就是弹出空白网页的原因(一直在连接),怎样彻底的关闭网页,不出现弹空页的现象
JS没怎么弄过啊,导入这个JS文件后,怎么把它显示在界面上呢?
感觉Web的TreeView真不好用啊
{ int position, i; List<TreeNode> functionTreeNodes = _FunctionTree.GetTreeNodes(); for (i = 0; i < functionTreeNodes.Count; i++)
{
permission += "0FF";//默认无权限
} foreach (TreeNode item in functionTreeNodes)
{
FunctionTreeNodeInfo info = (FunctionTreeNodeInfo)_FunctionTree.GetAppTreeNode(item).Info; if (info.FuncNO == 0)
{
continue;
} position = info.FuncNO - 1;
if (position < 0) continue; position *= 3; if (item.Checked)
{
//指定位置由0FF替换为1FF
Regex r = new Regex("0FF");
permission = r.Replace(permission, "1FF", 1, position);
}
} } private bool GetInput()
{
try
{
_Data.PermI_Name = txtName.Text; _Data.PermI_PermissionString = permission; _Data.PermI_Re = txtRe.Text;
}
catch (Exception ex)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), null, "alert('" + ex.Message + "');", true);
return false;
} return true;
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
try
{
MethodResult result; if (!VerifyInput() || !GetInput()) return; _Data.PermI_ID = _DataMg.DataList[index].EXS_PermissionInfo.PermI_ID; result = _DataMg.UpdateData(_Data); if (!result.Result)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), null, "alert('" + result.FullMsg + "');", true);
return;
} System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), null, "alert('修改成功!');", true); result = this._DataMg.LoadData();
if (!result.Result)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), null, "alert('" + result.FullMsg + "');", true);
}
}
catch (Exception ex)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), null, "alert('" + ex.Message + "');", true);
}
}第2问 好像我查出一些问题了,就是抛了异常之类的