For determining whether the Checkboxes are checked, you need to look for the control first by using
FindControl[
^] method of the repeater item.
Suppose this is your repeater and
Button2
is your export to PDF button:
<asp:Button ID="Button2" runat="server" onclick="Button2_Click" /><br />
<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<asp:CheckBox ID="Checkbox1" runat="server" />
<asp:Label ID="Label2" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Name")%>' />
<br />
</ItemTemplate>
</asp:Repeater>
You can accomplish your goal by implementing something similar to the one below.
protected void Button2_Click(object sender, EventArgs e)
{
foreach (RepeaterItem item in Repeater1.Items)
{
if (((CheckBox)item.FindControl("Checkbox1")).Checked)
{
}
}
}
Now that can filter checked items, you can use some third party API like
ITextSharp[
^] to export data to PDF.
Here[
^] is a good tutorial for starters about the API.