Hi,

I have a grdiview with checkbox both are in an updatepanel.
What i'm trying to do is whenever a checkbox is clicked i want my labelbox to show +1 and when it's unchecked i want to show -1 .
The problem i'm having is i can't access that check box, it doesn't recognized it when i start writing checkbox2 ...... my code looks like this :


vb Code:
  1. <asp:UpdatePanel ID="UpdatePanel1" runat="server">
  2.                    <ContentTemplate>
  3.                 <asp:GridView ID="GridView1" runat="server" AllowPaging="True"    OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing"
  4.                           onrowupdating="GridView1_RowUpdating"
  5.                           onrowcancelingedit="GridView1_RowCancelingEdit"
  6.                     AllowSorting="True"     AutoGenerateColumns="False" DataKeyNames="ID" PageSize="20"
  7.                     style="font-size: 7pt; font-family: Tahoma" UseAccessibleHeader="False">
  8.                     <Columns>
  9.                      <asp:TemplateField ShowHeader="False">
  10.                 <ItemTemplate>
  11.                  <asp:CheckBox ID="CheckBox2" runat="server" />
  12.            </ItemTemplate>
  13.             </asp:TemplateField>
  14.                         <asp:CommandField CancelText="C" DeleteText="D" EditText="E" InsertText="I"
  15.                             NewText="N" SelectText="S" ShowDeleteButton="True" ShowEditButton="True"
  16.                             UpdateText="U"  />
  17.                  
  18.  
  19.  
  20.                       <asp:TemplateField HeaderText="ID" Visible="False">
  21.            <EditItemTemplate>
  22.             <asp:TextBox ID="textID2" runat="server" Text='<%# Bind("ID") %>' Width="28" Font-Size="8" Font-Names="tahoma" Enabled="False"></asp:TextBox>
  23.                 </EditItemTemplate>
  24.                 <ItemTemplate>
  25.                     <asp:Label ID="Label15" runat="server" Text='<%# Bind("ID") %>'></asp:Label>
  26.                 </ItemTemplate>
  27.             </asp:TemplateField>
  28. .....



thanks