问题描述
如何在页面加载时显示值并在复选框列表中选择
i有一个爱好的复选框列表
并且复选框列表中有多个项目。
i存储了很多项目数据库(sql server)
但是当我要编辑我的个人资料然后
我怎么能检索这个值并希望它被选中..
..
假设有5个项目...我选择的项目是电脑游戏打板球阅读历史..等等
和clicke提交按钮和那些存储在数据库中的项目..
当我要编辑...这些项目电脑游戏玩必须在编辑加载页面上选择板球阅读
我必须为这些5o项目做些什么
我可能有用于循环或条件为这些5o项目.. ??
给我简单的编码提示..
hi,
how can i display value on page load and seleced in checkboxlist
i have a checkboxlist for "hobby"
and there are multiple items in checkboxlist.
i stored many items in database(sql server)
but when i going to edit my profile then
how can i retrive that value and want it selected..
..
suppose from 5o of items...my selected items are "pc games" "playing cricket" "reading" "history"..etc
and clicke submit button and those items stored in database..
and when i going to edit...these items "pc games" "playing cricket" "reading" must be selected on edit load page
what i have to do for these many 5o of items
may i have to use for loop or if condition for these 5o of items..??
give me simple coding hint..
这篇关于在页面加载时显示值并在复选框列表中选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!