开发者

how to disabled and uncheck the checkbox values from database fields..VB.NET ! [duplicate]

This question already has an answer here: 开发者_StackOverflow社区 Closed 10 years ago.

Possible Duplicate:

How to disable and uncheck the checkbox values from database fields..VB.NET

how to disabled and uncheck the checkbox values from database fields..

if i have entry in my database records as :

Name          Seats           Date

Sumit         1,3             11-Dec-2010
Sanjeev       2,4             12-Dec-2010
Manish        1,3,4           11-Dec-2010

I want on page load event the default date for todays is 11-Dec-2010 then checkbox1, checkbox2, checkbox3, checkbox4 will be disabled and unchecked state for 11-Dec-2010

as you see on the above database structure the seats for 11-Dec-2010 is 1,2,3,4 so the chekbox1, checkbox2, checkbox3, checkbox4 will be disabled...

I wanna this code snippet in VB.NET !! Can anybody help me in that ???


You should normalize your database - the Seats field is not normalized and should only hold one item.

Having comma delimited values in a field is bad practice. If you had a single value in it like the following:

Name          Seats           Date

Sumit         1               11-Dec-2010
Sumit         3               11-Dec-2010
Sanjeev       2               12-Dec-2010
Sanjeev       4               12-Dec-2010
Manish        1               11-Dec-2010
Manish        3               11-Dec-2010
Manish        4               11-Dec-2010

Removing a record would correlate to unchecking and adding one would correlate to checking a checkbox.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜