CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CheckBox

  1. #1
    Join Date
    Apr 2005
    Posts
    1,828

    CheckBox

    I have a checkbox within a repeater which is extracting value from the database. My code snippet it like this in code behind section

    Code:
    <asp:CheckBox runat="server" Text = '<%#((DataRowView)Container.DataItem)["Description"]%>'
    Checked = '<%#((DataRowView)Container.DataItem)["Permission"]%>' == 0 ? true : false
    In the green line the permission is a bit value coming from database. I want the checkbox to be checked if its 1 and uncheck if its zero. But I am unable to get the correct syntax . Can someone tell me that ??

  2. #2
    Join Date
    Feb 2009
    Location
    Atlanta, GA
    Posts
    17

    Re: CheckBox

    Isn't this the same question you asked in http://www.codeguru.com/forum/showthread.php?t=481058 ?
    Scott Knake
    Custom Software Development
    Apex Software, Inc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured