Click here to Skip to main content
11,704,768 members (51,818 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: checkbox

I am trying to use the checkbox control inside the repeater.
On this checkbox control, i am trying to call server side event for validation purpose.

but the call does not go to the server though i have used OnCheckedChanged Event.

I am able to get the client side function call using onClick Event, but server side event is not working.

please help me out.

please reply on my personal id:[removed]

Waiting for your repy.

Thanking You,
Bhavin Shah.

[Modified: you do not need to provide your email address. When you receive an answer, it will go to the email address you provided to CP.]
Posted 21-Jun-10 9:05am
Edited 21-Jun-10 9:20am
Moak at 23-Jun-10 3:52am
Which programming language? Please add it to the "Tags" field.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Try the following:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" >
       <asp:CheckBox ID="chk" runat="server" AutoPostBack="true" Text='<%#Bind("CustomerName")%>' OnCheckedChanged="check_changed"/>

protected void check_changed(object sender, EventArgs e)
        if (sender != null)
                if (((CheckBox)sender).Checked)
                    Response.Write(((CheckBox)sender).Text + " is checked");
            catch { }

Hope this will work. Cheers Thumbs Up | :thumbsup:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 658
1 OriginalGriff 485
2 Andy Lanng 275
3 CPallini 242
4 Maciej Los 225
0 OriginalGriff 8,864
1 Sergey Alexandrovich Kryukov 8,245
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,606

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 23 Jun 2010
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100