i have a book shop website
where in i am displaying the book details with a repeater
inside the repeater i have item tempelates for displaying the book data
along with the book data i have a check box
here is my requirement
when the user clicks this checkbox associated with a book the respective book details should get inserted in a
table in sql server, how can i capture the checkbox checked event inside a reator.
all help appreciated..
thanks in advance
i am attatching my screen shot also
Checkbox checked event in repeator
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

V S N Raju KanumuriRank #8,839 · 215 reputationPosted Apr 19, 2012, 4:28 AM EDT
In repeater write check box like as follows
In code behind window
protected void CheckBox2_CheckedChanged(object sender, EventArgs e)
{
CheckBox cb = (CheckBox)sender;
Label lbl = (Label)cb.Parent.FindControl("Label1");
if (cb.Checked)
{
//write ur code to insert into database
}
}
This will Help to U
mark "This is correct answer" If this post help you.
asim jan18 reputationPosted Apr 19, 2012, 6:01 AM EDT
V S N Raju KanumuriRank #8,839 · 215 reputationPosted Apr 20, 2012, 10:22 PM EDT
label text in code behind window(as mentioned above post)