Help CheckBoxList checked="checked" ?? 
Author Message
 Help CheckBoxList checked="checked" ??


How can I place default value in CheckBox. In my db I have a "Valid" field
and I want that some box are check when the page is loaded.

This is some line from my code... thanks

mytable.Columns.Add(New DataColumn("ID", GetType(String)))
mytable.Columns.Add(New DataColumn("Name", GetType(String)))
mytable.Columns.Add(New DataColumn("Number", GetType(String)))
mytable.Columns.Add(New DataColumn("Valid", GetType(String)))

Dim dr As DataRow
Do While rs.Read()

    dr = mytable.NewRow()
    dr(0) = rs("ID")
    dr(1) = rs("Name")
    dr(2) = rs("number")
    dr(3) = rs("Valid")



CheckBoxList1.DataSource = mytable
CheckBoxList1.DataValueField = "ID"
CheckBoxList1.DataTextField = "Name"


Thu, 22 Sep 2005 03:48:11 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Help with "checking if file exists"

2. How to check for "add record"

3. Check if Inbox is "Full"

4. Check an object reference for "Nothing"

5. check for "nothing"

6. Check "LOGON" Users

7. Client Side "Check All" script

8. How to check for "NOTHING"

9. Using the "Check" method in ASP

10. Treeview control support "Check box" Style

11. How to check for "NOTHING"

12. TreeView-ListView Showing Nodes as "Checked"


Powered by phpBB® Forum Software