复选框列表项值绑定 [英] Checkboxlist item value binding

查看:108
本文介绍了复选框列表项值绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我想将数据绑定到复选框列表项.

Hi there

I want to bind data to a checkboxlist item.

So when checkboxlist item is checked  'item 1'  -> insert (1,1,1,1) into the database   'item 2' -> insert (2,2,2,<big>2</big>), ect..
but when a item is unchecked the data wich was inserted must be deleted.



我想要的是,

我有一个PageID,UserID,PermissionID,RoleID

一个人可以说是管理员",登录后即可将用户添加到自己的OWN角色.
如果选中了在整个组合框中已选择用户的用户"具有查看"权限的复选框,则该复选框用于管理员可以管理的权限",如果未选中该复选框,则不允许其查看该页面. br/>
我无法弄清楚的是,如果我检查了多个项目,我希望在按提交后将它们添加到数据库中,但是当我取消选中它们时,必须将之前添加的日期从数据库中删除.

另外,当项目已被选中/取消选中时,即使是注销用户,管理员也应该能够检索某些用户的选中/取消选中的值.



The thing I would want is,

I got a PageID, UserID, PermissionID, RoleID

One person lets say an "admin" whe he is logged in he can Add Users to his OWN Role.
The checkboxes are for the permission "wich the admin can manage" if a item is checked "the user wich has been select throughout a combobox" has VIEW Rights, if the checkboxes are/is unchecked he is not allowed to view te page.

The thing I cant figure out is if I check multiple items, I want them to be added into the database after I press submit, BUT when I uncheck them the date wich was added before must be deleted from the database.

Also when items have been checked/unchecked the admin should be able to retrive the checked/unchecked values when of a sertain users even when he logsout.

推荐答案

用于
when checkboxlist item is not checked  'item 1'  -> remove (1) into the database   'item 2' -> remove(2), ect..




*我希望开始是索引...




* I hope Starting is index...


这篇关于复选框列表项值绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆